When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
I had that happen on my 2002 7.3 and it was the throttle body; I'd try replacing that as well, not that spendy for the whole pedal assembly.
I don't know why I said throttle body, I meant to say the accelerator pedal assembly, not the throttle body. Also, have you disconnected the battery for all night?
my truck is cable operated not drive by wire. And yes ive left the battery off from Friday afternoon till Monday morning on more than one occasion and its hasn't helped
I had the same idle and stalling problem but only on start up, it never did while I was driving. Replacing the IAC valve fixed it but you've already done that. I would think that it would have to be computer/electrical related as its stalling when shifting from R to D and as far as I'm aware, nothing changes when you do that besides for the transmission.
On my wife's Grand Cherokee, it had a similar problem and eventually we found that it was bad battery cables. They had chafed through further along in the engine bay. It might not be the same problem but easy to check for at least.