I had similar problem intermitantly for over a year. Had to have my truck towed home several times. Finally figured out it was the crankshaft sensor. $40 and 10 mins to replace it and 4 years later no problems.
Before I discovered the problem, i changed the distributor cap/rotor and the spark...