How am I going to pass inspection?

I have a 1997 honda civic ex and the car used to be a automatic but the previous owner converted it to a manual. My problem is that the check engine light is on… My mechanic told me it's on because the car still has a automatic ECU? What can I do! Btw it's my first car and I ****** up

You did not see the check engine light lit when you bought the car or when you test driven it? The ECU or PCM or whatever you're calling it, need to be replaced. Period. Your technician is corrected!

If a mechanic told you what is wrong, is that not the same thing as to what needs to be corrected? Why ask here? Ask the mechanic. As to the wisdom of buying a car with a known deficiency, well, that is another posting.

Check your state's DMV laws. It's illegal to sell a car that fails emissions test, at least in most states. You can demand that they take it back and return your money, or sue them for whatever it costs to fix it.