My friend has had to change a few neutral safety switches on Jeeps and othe Mopar automatics...they can cause strange symptoms like yours as well as foul up the shifting of the tranny...
He never would have suspected that to be the cause,till he called a local dealer to see if they had an ignition switch and key in stock (he's had those go sour,the chip in the key starts acting up)--the parts guy asked him if he replaced the neutral safety switch yet--when he said no,he said I'd try that first--we sell a lot of them,and the symptoms you describe match up...so he bought one and installed it,and he hasn't heard anything back from the customers yet,so he assumed that fixed it..the trucks had no codes showing so he suspected a electrical power loss..he said it was no fun getting the switch on too...I think he had to drop the pan and connect wires inside it if I remember right..