Thank you for choosing JustAnswer and allowing me to help you resolve your Toyota questions!
Because this engine does not use an EGR valve everything else has to be 100% and ready to go. From the list of things that you have done the only thing that I can see that could possibly cause the NOX to fail is a week or very poorly operating knock sensor. Knock sensors themselves will usually set a code when they malfunction but this is normally only happens when it is a total failure either open or shorted. If the knock sensor itself just is weak and is not sending the proper signal to the computer it will throw off the ignition timing or not retard for a knock situation. Engine ping or knock is what is contributing to NOX failure. pre-detonation or pink is what drives up the NOX number. I normally never recommend just replacing parts. This being said the only way to effectively test a knock sensor is with an oscilloscope. The knock sensor on this vehicle is located behind the intake manifold on the side of the block it is almost directly behind the intake runner tube going to cylinder number two. Excessive chain play or stretch due to high miles could possibly drive the ignition timing off slightly but that would be a worst-case scenario causing the failure on NOX. Because the HC does not seem to be out of order this only leaves
I went out to check to see if I could locate it...would it be under manifold cover? Do you have a picture of what it looks like?
How difficult is this to replace on a scale of 1 to 10? Any idea on how much this will cost if I hire it out or if I do it myself?
One last thing...I don't know if this will narrow it down but after taking my vehicle in today the NOx GPM was 1.0457 (PASS) but the overall test failed due to the gas cap integrity. So I went and purchased a new gas cap and returned to have it tested again and that is when it failed with the NOx 1.6305. On all prior tests the gas cap wasn't even in the equation. Any idea why?