2004 Ford F-150 P2040 code

I have a 2004 Ford F150 5.4 engine with 2004K miles, just replaced the passenger side close to firewall plug which was a misfire and the check engine light was flashing and engine shudde. now after a few miles the check engine lite came on showing the P2040 code and shuddering again??

ThenP2040 code is not a misfire code, it is an emission air pump code so changing a plug won’t help. If it has a misfire at 2004k miles… that is over 2 million miles… I will assume you mean 204k or 204,000 miles. You need to run a compression test. If all is ok, I’d replace the coil.

Here is the definition for code P2040:
Description: Reductant Injection Air Pressure Sensor Circuit High Input.

It means there is a problem with the circuit to that sensor. Most likely a bad connection to it. Hopefully the connector to the sensor was just accidently disconnected somehow. If that isn’t the case then the wiring going to the sensor should be checked out first for a problem before replacing the sensor itself.

I may have erred on the check engine code, it’s the code for Catalytic Converter Insufficientcy, I disconnected the battery which made the code disappear and I am sure it will return after a few more miles but I am concerned about the shuddering, bucking and jumping that started after a few miles. Thanks