If you are the nonresident spouse of a nonresident service member, you do not pay Montana income tax on income you earn while they are stationed in Montana.
There is nothing to apply for. Leave the exempt income off your Montana return and keep proof of your home of record in case the state asks for it.
Your marriage certificate, your service member’s orders assigning them to Montana, and proof that you are both residents of another state.