+1 on the above, but...............
You should be OK with the speedo as is.
Ford uses an 8,000PPM(pulse per mile) speedometer, thats what the gear driven setup on transmission or transfer case VSS(vehicle speed sensor) sent out, this was used starting in the late 1980's for cruise and the computer for automatic trans shifting.
In 1995 Rangers got electric speedometers so VSS also was used for that
1998-2000 used the rear ABS VSS which sent out about 20,000PPM, so in those years Ford sent that 20,000PPM signal to the GEM(body computer) and it changed it to 8,000PPM and sent it out to the speedometer, computer and cruise as needed
You will still use the GEM in 1998 Ranger so the dash wiring will stay the same, you will need to use that 8,000PPM signal for the 1997 computer
On the computer(PCM) pin 58 you will see a Gray/black stripe wire, thats where the 8,000PPM signal needs to go
1997 V8 and 1998 V6 PCMs will have the same Gray/black stripe wire on pin 58
In 1997 it came from VSS on trans
In 1998 it came from GEM. so find and cut this Gray/black stripe wire from pin 58 on the 1998 V6 PCM, then splice it to the Gray/black stripe wire on pin 58 of the 1997 PCM
1997 Explorer PCM also did not have PATS(passive anti-theft system) which is one less thing you have to deal with