My dad still has a 4.7L WJ. It needs a new ECU, I believe. I keep getting P0505 and I've changed the IAC and checked the wiring. Still not solving the issue. If the ECU was in working order, I'd buy it.
Bummer, I know hunting down codes can be a pain in the ass. Maybe look elsewhere? Fueling, spark?
Sadly, the PCM is from these era of Chrysler product is known for shitting the bed. His is under a lifetime warranty. If the wiring and IAC are good, then the PCM is the next thing on the list to replace. We replaced the TPS, just in case... no luck.