Okay, I think I finally resolved the P2004 and P2017 on my pastor's 2008 Avenger. I swapped on an intake manifold from a 2009 Dodge Journey, P/N 04884495. The CEL is off and he passed Cal smog.
There's some great information/experience communicated in this thread. However, I think it's important to read the service bulletin related to this issue. The bulletin states that if you have a CEL on with DTC P2004, and no other symptoms, you may need a software flash update and an updated intake manifold. The bulletin covers some Avenger, Caliber, Sebring, Compass, and Patriot vehicles. For Avenger and Sebring, they recommend the flash update if your vehicle was produced through May 15, 2007, and the intake manifold upgrade if the vehicle was produced through March 22, 2007.
Also if you have an Avenger it helps to know a bit of history. I'm using Wikipedia for some of this. Apparently since the Avenger was re-introduced in 2008, Ma Mopar got a very early start on production and rollout; 2008 models hit the showroom floor as early as Feb 2007. As it happens, my pastor's car was manufactured in Feb 2007, so it seems apparent that he had the inferior intake. This particular vehicle also has 185K miles on it, so it actually lasted way beyond the normal expected service life. It may well be that most 2008 Avengers were in fact built early, and are subject to this issue.
Also, as far as I can see, the early manifold has metal flow flaps, whereas the new intakes clearly use some kind of plastic. Perhaps the plastic design does not accumulate the crud that the early one does; mine came off a wreck but was very clean and rotated smoothly without any binding. The $250 brand new units I see on eBay carry the correct updated P/N, and appear to have the plastic flaps.
I decided to focus on the intake and not the software update. My intake was $30, and $7 of that was the core charge. It has a sticker on the underside with the last four digits of the P/N, 4495. I didn't even mess with the injectors or fuel rail; I simply swapped the whole thing in. His throttle was also filthy so I cleaned that out as best I could, and the occasional hesitation he was feeling while driving is now gone. Not sure if it was the flow control or the throttle or both that was causing that, but it's now gone.
Based on magemorph's post, I disassembled the intake that came off the car, and of course it had the metal flaps and some crud. There may have been a very slight binding, but no side-to-side play. I removed the flap/shaft assembly and did see that on one of the plastic bearings, the inner diameter had separated from the rest of the bearing, so the bearing was wobbling on the shaft. So that's what will have to pass for 'differential diagnosis'! Thanks magemorph.
Anyway, check your engine bay for any dealer update stickers; maybe you already have the flash update and/or improved intake. Mine didn't. Thanks for all of the help; it was a life saver. BTW, I called my local Mopar dealer and they quoted only $340 for the intake.