I moved from New York to Virginia 2 years ago. I recently received a backpay from NY with NY State taxes deducted when I now live in VA. do I need to pay VA instead?

I haven't worked in NY since I moved to Virginia.  Do I need to file new york to get the money back and account the backpayment to Virginia when I file even though it was earned originally when I lived in NY?