Hit the "reset" button and start over. You have a problem with the truck "shutting off" and anything after that is simply a WAG. You made an assumption that it was x and this can blind you to the real problem while chasing your tail.
It could be electrical. It could be fuel. It could be water in fuel. It could be a clogged fuel filter. It could be gasoline in the fuel. I hope you keep records/receipts of the last place you got fuel.
Did you install a new fuel filter? Can you cut the old one open and check it for problems? Does the fuel smell like gasoline? Any water come out of the filter drain?
No, the WIF light is an example of an unreliable bad joke.
Bad joke and an air leak... I have had the WIF sensor leak on plastic body WIX fuel filters. This caused a low rail pressure code and limped the truck at WOT. Fuel filter heads crack, but, IMO this causes a no or hard start condition.
Rant: By forcing the truck down the road 2 miles at a time you could be forcing muck gasoline/water/bugs through the fuel system and costing yourself a big pile of cash in a ruined fuel system. The starter and batteries don't like this extra cranking. New Vehicles are recalled nowadays for engine shutdown so I politely as possible suggest next time one call the damn hook and get the vehicle to where it's safe to work on. AAA, cell phone co, insurance co: all offer towing plans that take the single tow bill sting away. Lots of people get killed on the side of the road by others texting, drunk, etc. If the engine/vehicle was "expendable" due to an emergency or survival situation please accept my apologies.