Maine does not tax military retired pay. Your military pension is fully exempt from Maine income tax.
There is nothing to apply for. Leave your military retired pay out of the income you report on your Maine return. If Maine 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.