1990-2000 Ranger 4.0l OHV
2.9l and 4.0l share the same Block, so motor mounts and transmission bolt patterns are the same.
Because of changes in the 4.0l over the years a '90-'94 would be best bet.
Automatic transmissions can be a problem because of the computer control, so manual is easier.
You need the computer and engine wiring harness from the 4.0l's vehicle, don't forget MAF, EDIS module and air cleaner, again trans can be an issue.
Rebuilding the 2.9l would be easier, just FYI