Massachusetts does not tax military retired pay, so your military pension is fully exempt from state income tax. Thrift Savings Plan distributions are different: they are still subject to state tax, and early distributions can be taxed more heavily.
There is nothing to apply for. Leave your military retired pay out of the income you report on your Massachusetts return. If Massachusetts tax was withheld from it by mistake, file a return to claim the refund.
Your Form 1099-R showing the retired pay, kept with your tax records.