I did have the same problem and when check the codes I got P0325 #1 knock sensor. I read a lot about the TPS & IAC been just plain dirty together with the throtle body, so I bought carburetor cleaner remove the resonator I got an Overland 2004 with the 4.7 V8 HO to show the TB the TPS & IAC cleaned all very throughly, replaced air filter and bingo idles like new!!
Just need now new plugs they are on the way, since I just bought my toy with 79000 miles
on the clock!!