Ive been having that problem with my '04 for a while as well, since summer of 2010 is when it started. Right about 2000rpm going up hills it will ping like a mother, but if I press the gas a lil more than it instantly disappears. Tried fuel cleaner, seafoam, new plugs and wires, cleaned maf, iac, throttle body etc. I've read one thing that could work on ford explorers/rangers , but I havent tried this: tightening the bolts on the upper intake manifold. I guess the bolts can loosen over time and lets in way too much air and causing the ping.
I'm not really sure which bolts or where they are located, but if you know what they are it could be worth a shot...lol. If you try it, be careful I think the upper manifold is plastic and easily warped/broken.
Let us know if you figure it out....I'd love to get rid of this rattle.
2004 4x4, ex-fleet vehicle. 4.0 v6 with 110 k, 4.10 gears.
Modifications: Whelan hidden strobes, Ion 174 alloys, yokohama geolander at 235s, billet grille, airbox mod, Dynomax exhaust. slight torsion crank. More to come!!