I agree with checking the wiring under the hood. My throttle issue was making the truck go into limp mode. Limp mode causes the engine and tranny to act just like you describe. My scams would get codes for throttle voltages. Turns out ONE wire I had repaired under the hood didn’t have a proper enough repair. It was one of the throttle 5v circuits. There are 2 for redundancy. While inspecting the main harness I found lots of shiners(wires so squished the insulation had split exposing the copper, hence “shiner”) under the engine cover. I removed the throttle harness all the way back to the alternator and replace it(soldered in a spare I had). Just some .02$. Good luck.