What engine is it?
I think there was a TSB about the early 2000's Rangers, they moved the PCM(computer) and connector to the upper center of the firewall, this caused a problem with moisture getting into connector.
They added a second cover over it after cleaning connections.
Unhook the battery!!!
Then remove that connector and see if it looks clean and dry inside.