I would start placing bets on the alt and/or battery.

Start with a new battery (might as well fix a known problem before troubleshooting the unknown) and get the alt tested while you are at it.

Alternators do not die in a binary manner. They work, don't work and then sometimes work somewhere between those two points. It may be putting out enough (or too much, hence the dead battery) to power the truck, but the TCM is not happy and the tranny does not shift properly.

Got any strange dash lights? What does the engine do when you turn on the head lights and heater fan to hi at the same time?

Michael