Make sure EGR system is working if you have that system, it helps cool the cylinders.
Although you should get a CEL if it isn't
How many miles on the engine?
Could there be some carbon build up in the cylinders?
Pinging comes from 4 things:
Fuel mix too lean, MAF, low fuel pressure, or vacuum leak
Cylinder getting too hot and pre-igniting fuel, lean mix, EGR and/or carbon build up
Timing advancing too much, Cam position sensor or broken anti-knock sensor
Compression too high for fuel octane, carbon build up
4.0l is a low compression engine so regular gas is best
Octane is a heat measurement, the higher the octane the more heat it will tolerate before igniting.
Compression = heat
When fuel/air mix comes into the cylinder it cools it, lean mix means less cooling and also a more explosive mixture, the perfect gas/air mix will melt an engine, just FYI.