Don't amend your state return just yet.
Contact the state office that sent you the letter -- the number should be prominently displayed, somewhere -- and ask them what actions you should take.
After explaining what you're stating here, they may be able to make the adjustment with no further action from you.