If you are a military spouse who is not a Minnesota resident, the wages you earn in Minnesota are not taxable by Minnesota. Your service member spouse has to be in Minnesota because of military orders, you both have to have a state of residence other than Minnesota, and you have to be in Minnesota only to be with your spouse.
There is nothing to apply for. Leave your Minnesota wages out of your Minnesota taxable income, and file a Minnesota return to claim a refund if Minnesota tax was withheld anyway. Ask the Minnesota Department of Revenue how to stop the withholding going forward.
Your spouse’s military orders assigning them to Minnesota, proof of the state you both claim as your residence, and your Form W-2.