New Jersey will give you a credit for the tax you paid to New York.
Prepare your New York nonresident return first. Then prepare your New Jersey return. During the New Jersey interview, you'll see the Summary of Taxes Paid to Other States. If you click Edit next to the entry for New York, you'll see the information that was transferred from the New York return. If the amounts are correct, just click Continue. TurboTax will display the Credit for Tax Paid to New York. (Click the screenshots below for reference.)
How do I file a nonresident state return?
https://ttlc.intuit.com/replies/3302052