When you enter your W-2 you should enter zero wages for the nonresident state and only the withholdings. Next you must add a state for the nonresident state and selecting nonresident status. You should end up with no income on that state return and only the withholding as a payment and a refund.
There will be questions in the preparation that should allow any adjustment to remove any income for that state. You can always go directly to the state website to print the blank forms and mail them with a copy of your W-2 and a copy of your resident state return. You can add a statement that you did not work in their state and that the employer withheld the state tax in error.
Click the link for the state you need. State Filing Requirements
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.