PCM wiring pins don't really change. 1995 and up EEC-V were all the same, the engine size and transmission type would change the number of pins/wires used, and the software inside changed.
2000 won't work, the 1998 4.0l engine will use 3 wire Cam sensor, 1999 and up use 2 wire, different signal types, there is no wiring conversion for that
And 1996 won't work either, fuel calculations are based on 30psi fuel pressure, 1998 and up used 60psi pressure
PCM also needs to match transmission type, auto or manual, and if auto, 1997 and up 4.0l Rangers used 5R55E, 1995/1996 used 4R55E
The 2000 is the closest match(assuming transmission matches), and you should be able to buy a 2 wire 4.0l synchronizer and cam sensor and then get 2 wire connector from wrecking yard to splice in to harness
The Cam sensor's one signal wire to PCM was the same, signal and ground, 3rd wire just had 12v added for hall effect type sensor
And software in PCM was different for 2 wire sensor which is why you need to use 2 wire Cam sensor
Ultimately getting 1998 PCM matched to trans would be best, refurbished they run about $150
PCM has a code number on the label that can be matched