If you were active duty military in those years, then your military pay would be subject to state income tax only in your military State of Legal Residence (SLR). You would not have to file in states where you were stationed on PCS orders unless you had income in those states other than your military pay.
**Answers are correct to the best of my ability but do not constitute tax or legal advice.