Possible answer

Continuing the discussion from 2004 F150 5.4 Triton engine light on Need help Fast!:

I have had this issue as well with 2004 f150 5.4. I had similiar issues after replacing battery. What happened was that the throttle body where the butterfly is had a carbon buildup which made the butterfly not seat in the 0 position. So i cleaned the carbon from inside throttle body , then reconnect computer and battery. This solved dying and rough idle , transmission jerking in high gears OD was first, as well as engine lights. Whenever you disconnect battery on this engine you should clean throttle body. Hope this helps.i also had the same codes as you.

Really…