I had this problem on my 2001 Dakota with the 3.9. It turns out that the throttle position sensor needed to be replaced. According to the dealer, this is very common. It cost about $200 at the dealer. I was traveling so I wasn't able to shop around, it may be cheaper elsewhere.
On the 4.0 liter - OHV - V6 , it's low down on the drivers side of the engine , where the transmission is bolted to the engine
It has a timing chain. The chain is inside the motor, and runs across both cams and down to the crank shaft, which is located on the left hand side of the engine block.
you have to separate engine and transmission
On your 1992 Ford Ranger , 4.0 liter : The starter should be on the drivers side of the engine , low down , where the transmission bolts to the rear of the engine
On the 4.0 liter ( OHV ) the starter is on the driver's side of the engine , low down , where the transmission is bolted to the engine
On the 4.0 liter OHV it's on the drivers side of the engine , low down , where the transmission is bolted to the engine
Check your cam shaft position sensor. I had a similer problem
Fuel is injected into cylinders. Spark plugs ignite it. Piston goes down turning crankshaft. Repeat.
On the 4.0 liter OHV , V6 engine the starter is on the drivers side of the engine , low down , where the transmission is bolted to the rear of the engine
On the 4.0 liter OHV , V6 engine the starter is on the drivers side of the engine , low down , where the engine is connected to the transmission
Down the bottom right of the engine bay!!
It has 4 of them. 2 up streams and 2 down streams