This video may help you. Keep in mind this video is for a 1999 Ranger with a 4.0 yours may be different and you need to go by the manual.
I suggest going by a Ford manual or Alldata the Haynes manual may blur multiple years together which could lead you down the wrong path with the wrong information.
Also make sure to check for any relevant Technical service bulletins either with the part or service procedure to make sure you are going by the latest information available.
I would make sure to use a OEM New Ford part.
If you have a new Ford sensor and shaft synchronizer and are still having the same problem, then you need to diagnose the problem using the OEM Ford pin point test
for the code or codes that are present.
These pin point test can be found with an Alldata subscription or Ford service manual