Welcome to TRS
Ford Rangers had two different 2.3l engines, 2001 and earlier was the 2.3l(or 2.5l) SOHC Lima 4cyl engine, 2002 and up was the 2.3l DOHC Duratec engine, actual change was mid-2001, so late 2001 Rangers could have 2.3l Duratec
4.0l transmission will not bolt to either, and automatic transmissions do not have detachable bell housings, you can disassemble the whole transmission and replace bell housing, but it is cheaper and less work to just get correct transmission that will bolt to 2.3l engine.
Yes, 1994 and earlier Rangers used the A4LD automatic transmissions
You will also need the Cross bar in the engine bay for the 2.3l motor mounts
And 2.3l computer with it's engine wiring harness
Computer also needs to be for an automatic trans, A4LD needed computer control for lockup and Over Drive