The 4.0l SOHC engines have a ping/knock sensor that can fail, this is pre-ignition knock not mechanical knock.
The '07 4.0l will have the newer timing chain parts so not as likely to fail like the pre-'03 engines did.
The knock sensor is needed on these engines to get them to run on regular fuel, for the best performance higher compression ratio and aggressive spark timing were used, so this engine will knock on regular gas, period, the knock sensor is needed to prevent this.
Without knock sensor working you would actually feel better power since spark is not being retarded to prevent knocks, but it would be damaging engine long term.
I would try running higher octane fuel and see if knocking diminishes or goes away, if it does then you will need to change the knock sensor, it requires a bit of labor to get to it.