2001 to 2012 Ranger would be the 4.0l SOHC engine
1990-2000 is the 4.0l OHV
1990-2000 would be a plug and play swap using your 1991 computer and wiring harness, as long as you swap your 1991 upper and lower intakes over to the later model 4.0l OHV
And yes as adsm08 said the flywheel/flexplate needs to be swapped
2001 and up 4.0l SOHC swap would be more involved, you could use current transmission if its a Manual, if automatic then you need to get one for the 4.0l SOHC, and this will also come with speedometer issues for 1991 Ranger
And you need 2001 and up 4.0l SOHC Computer and wiring harness
Exhaust and added O2 sensor
New fuel pump and Filter
IMO, the 4.0l SOHC swap into 2000 or older Ranger is not a good swap
Same work is involved as a V8(5.0l) swap and you have something Ford never made, anyone can go out and buy a 4.0l SOHC Ranger, so can you