some basic maint will probably help it a great deal.
Clean throttle body, new plugs, check for vacuum/boost leaks, clean PCV system(yes injected engines have em too), set idle speed properly, scan for codes in the ECU, set timing to correct values.
Make sure valve timing is to spec.
Change air filter and clean MAF.
Do a compression test. No engine with a dead hole is going to run cleanly.
After you do that stuff, it will run better and get better mileage. And if it doesn't pass, it will be alot closer.
Put it on a datalogger and monitor the O2 sensor voltages(both pre and post cat) If these are lazy or are non-op, you will need to replace the one(or both) that are faulty.
Treat it with a good MCCC cleaning and decarbonization with misted water.
If all of this fails, replace the catalytic converter.
Yes I know its alot to do, but you need to do basics first and work up from it. I work right beside 2 really good aircare specialists and I listen and ask tons of questions.
As for price, you can do tons of this yourself, and you will just have to ask around at good shops to see what they will charge for the rest.
PS, a fuel filter won't help you pass, but you could change it while you are in there anyways.
Oh and check that your EGR valve is working too. Not related to the fail as your NOX is good on this test, but you may as well make sure its up to snuff while you are in there.
Good luck.