That happened to me last year. It took a while to figure out because it is not obvious, but if you go back to your federal return, go to your W2, and next to where you entered Code Y there is a dropdown. Click that and select Massachusetts state retirement plan. Gets me every time.