I was NJ remote worker for a NY company. I only had taxes withheld for NJ. Now it says I owe a lot of tax in NY. Is there anything I can do to avoid paying double taxes?

As the question states above. For extra detail, the company I worked for is based in a different state but is incorporated in NY and not in NJ, hence why I received W2s for both NY and NJ.

All my googling has shown is that if I withheld in NY then I could receive a credit back for NJ but since I only withheld for NJ I'm not sure if i can get a credit for taxes currently owed to NY. I also withheld the maximum amount for NJ.