Your truck is about six years different from mine and has quite a few more sensors and several more control appliances.
So there is going to be some difference between the two....The engine in my truck is virtually new....took out the old 302 that was in it, because of the same problem that you've described....And replaced it with a rebuilt 350 block from a reliable and experienced rebuilder.....Moved everything over to the 350 block, pulled the 302 and there was "at least" an inch of oil caked inside the valve covers, and pretty much everywhere else in the old block....I figured from the start that I would need to replace just about all of the sensors, changed all sensors except the knock sensor, rebuilt the TBI, new distributor cap and rotor, plugs, wires, IAC, ICM....Though not actually new, the engine is virtually new.....I guessed at a dead short or loose ground somewhere causing the Engine control module to send wrong signals......I guessed this because gremlins were acting up as if on a timer..... Bought a new multimeter and tested everything I could possible think of to test....Found several shorts and pulled the fuse to the circuit....still acted up without the fuse.... Pulled the fuse on every circuit "except" the hot all the time fuses....Did the same thing, started, idle, stall, idle, stall, idle, shut off, like it was on a timer...Waiting on a signal from "somewhere" that it wasn't getting....When I got around to changing the ignition control module to see if "that" was the problem, The old ICM ohmed out correctly, but while I was changing it I noticed an oily film within the cap and on top of the old ICM....Long story shortened....I replaced the old distributor that we,...a friend who only "thinks" he's a mechanic,...It was also covered with a thick coat of oil, and had to be thoroughly cleaned before we put it in the new block,.....with a new distributor which just so happened to include new cap and rotor, and ICM....Shoulda bought that in the first place instead of the new cap and rotor, then the ICM, then the distributor which had all three....Oh, the distributor pick up coil also ohmed out good.....Dropped the new distributor in today, and there's still a small gremlin in there somewhere, probably not quite in time yet... It was a double B to get the distributor back in right to get it to start, still wanted to try and stall, but if it did shut off, could start it back up and it would usually idle good...I'll have to borrow a timing light tomorrow,...Had to buy a distributor clamp wrench, cause the odds are that you ain't getting to that bolt with anything but....Had the rear wheels up on blocks, and truck bed raised eight inches off the frame to check, and if need be replace the fuel pump...Any time I got the truck running, before, when I shut the ignition off, the pump continued to run for anywhere from 15 to 30 seconds, which ain't right,...But the fuel pump ohmed out good....Got off the ramps and drove around the block, no stall, trans still tried to act up just a little when trying to change from first....Around the block, hooked up my seat belt and hit the highway... 50, 60, 70, going up a fairly steep grade, and the trans stopped slipping in the process....The actual culprit in this instance was, I believe, the distributor gasket, which was somewhat distorted on one side, and cracked at least half the width of the material,....which allowed a small amount of oil to constantly come out from around the gasket to get sucked up into the distributor cap through the vent holes in the bottom of the distributor plate.....Check under the distributor cap and see if you can detect a small oily film, or dried oil stains on the plate....you "MIGHT" have a simple problem of a cracked, broken or distorted distributor gasket....I figured out how to replace the distributor by researching a few utube videos, and by cruising around these questions.....These questions are one of the primary reasons I even considered the new distributor, cause I hate doing that, cause I really don't know exactly what I'm doing.
Good luck on your truck.