You probably have the M5OD-R1 for the 3.0l, it will probably not last you long if you ever use the V8 power.
You should get it's big brother, the M5OD-R2 used in F-150s
Find a '97-'04 V6 F-150 4x4, it will have the M5OD-R2, get the trans and BW4406 transfer case.
Shifter will be very close to Ranger shifter hole, and it will bolt to the 5.0l as is.
Transfer case is a tight fit.
Found this conversion thread: Swapping An Explorer 5.0L In To A 1998-Up Ranger