The 5.0l(302) OHV is a narrow engine so fits in a Ranger, 19" wide
The fuel injected versions of these can have a tall intake in most Fords, the Explorer intake was shorter which is why most used the Explorer V8 5.0l, just FYI
5.0l(302) OHV Bell housing pattern is Ford "small block", this is what the new transmission needs to match
You don't say but I assume you want a manual transmission?
Yes, it needs to be a 4WD model and you will also need the transfer case with it, the BW1354 in a Ranger can take the power of a V8 but not made to do so, also would need an adapter to use it with any model 302 pattern transmission
Yes, you can use an earlier model truck 4x4 transmission, from a 302, but its shifter will come up thru the floor just under the dash, so you will need to cut out the floor and bend the shifter arm so it will work, not hit the dash
The 1997-2003 4.2l modular V6 used the same small block bolt pattern as the 302
It used an M5OD-R2(M5R2) the bigger brother of the Rangers M5R1 transmission, M5R2 was made for V8 power, and its shifter placement is the same as in a Ranger
It also came in 4WD versions in the F-150 series in those years
The 4WD electric shift controller in a Ranger works with any Ford electric shift transfer case
M5R1 and M5R2 are models, not what they fit
A Ranger M5R1 from a 3.0l won't fit on a Ranger 4.0l engine
A F-150 M5R2 from a 5.4l won't fit on a 4.2l
The M5 series is engine model specific
Some minor mods to
@RonD 's post:
Most of us use an Explorer 5.0/Automatic, because it is basically a bolt in. You remove the PATS, ECM, locks from doors and ignition switch from your 3.0; replace them with the Explorer ones. Swap the engine and transmission and you're running again using the Explorer's keys. Anything beyond that gets more complicated = less likely the project gets completed. Not sure how much better the Mustang heads are than the GT40P heads on the Explorer, but fitting exhaust for anything but Explorer is pain in you know where.
Historically, Advanced Adapters made an adapter to allow the BW1354 transfer case to bolt to the 4R70W automatic, but as Ron says that case isn't really designed for V-8 power. To install the 1354 output shaft in a 4R70W, you pull everything out of the front of the transmission, install the new output shaft and put all the pieces back in - if your transmission needed a rebuild, that's the time to do it. The ideal case (IMHO) is the BW4406 found in '97-03 F-150/Expeditions. It is about 2.5" narrower than the BW1356 so fits better between frame rails, yet retains the Ford electronic shifter (for better or worse).
4.2 is part of the 3.8/3.9/4.2 Essex family, not Modular. The Essex and SBF bell housing patterns are the same, but Essex engines use 12mm bolts while SBF use 1/2", so you would need to ream the holes to bolt up and Essex transmission to your 5.0. The 4.2 version of the M5OD-R2 has the same shifter position as your existing M5OD-R1 (assuming you have manual); the old 5.0 version is about 6" ahead; as indicated, it needs some subtle mods to fit. So, there are pluses and minuses to whichever choice.
M5OD-R2 doesn't come behind 5.4 Modular engines, only 4.6's. As RonD says, the 4.6 M5OD-R2 has a different bellhousing pattern.
But all truck M5OD-R2 are the same internally/output, so you can take a 4.6 M5OD-R2 4x4 transmission remove the rear housing and output shaft and install them to any 4.2/5.0 M5OD-R2 4x2 transmission (more work, but more common...).
There are also M5OD-R2 in T-Bird SuperCoupe's (and Cougar exquivalents) but their gear ratios are slightly different, so you would need to swap gears too if using one of those as the 2wd donor.
The M5OD-R2 throw out bearing is the same as M5OD-R1 so you can just connect the existing clutch line.
Another piece of information: NP273 transfer cases - used in SD trucks uses the same planetary as some of the lighter duty NP cases, just with 6 "planets" not 3. (e.g. 231, 242, etc). So, it is possible to swap the Ford input gear into those transfer boxes. And the NP boxes, BW4406 and BW1356 all use the industry standard transmission/transfer case interface so are more common options than the BW4406. Why Ford did different interface for the 1354 is just one of the Ranger's peculiarities...
If you are using an Explorer ECM with manual, you will need to have someone delete the "Check Engine" light where it can't connect to the Auto.