Your 97 Explorer came with the 4405 case. Mid '97, Ford switched styles of front outputs, and eliminated the mechanical VSS.
For an exact replacement You can look at your t-case tag / stickers, to see if it is a 4405-CA, or 4405-GA. (or run the VIN)
The older IFS (TTB) Rangers and Explorers used a 1354 case, that will also bolt up. The Manual is the preferred case when using these on the '95-'01 Explorers. Straight bolt in swap, no electronics, and more reliable than any case from '91-'01.
The Rangers do not match year to year exactly in generations with the Explorer, and parts shared. I "Think" Rangers are IFS (SLA) from '97+, and are the same from '97-'11. At some point Ford changed out the 4405 in them, and went to a hybrid 1354 in later models, sometime after '01.
You can learn more details in the Ranger section, & the Driveline section.