Code 54 indicates the IAT sensor reading is out of range. I'd try replacing the sensor first, unless you can see an obvious damage to the wires around it which needs repaired first. The sensor tends to gum up with crap from the exhaust as EGR gases flow past it. It will be screwed into the upper intake plenum, middle runner, passenger's side. Two wire connector.
Don't buy it from NAPA. I will normally use NAPA parts if I can't get OEM, but NAPA makes this part from a cheap urethane plastic. I used one, and it worked well for years, until I took it out to test it, and it broke while I was putting it back in. Buy it from Autozone or Advanced, they use metal. I recommend GP Sorensen.