The two main reasons for your truck to just stop are
1. Lose of fuel, Cause : plugged fuel filter ,bad fuel pump break in fuel line, lose of power to the injectors .
2. Lose of spark Cause: coil failure, battery failure ,alternator failure, wiring failure ECM failure
If you want me to be more specific then I need more information on what happened and what the truck is doing when you try to start it