On the driver's side, just above the batteries, there should be a battery disconnect switch... turn it off.
Then on the driver's side of the engine, flip the levers on the ECM plugs to push them out, one at a time, then relatch the levers. If there's a flaky connection at the ECM, that should take care of it.
Turn the battery switch back on. If the truck still doesn't start, repeat one more time.