You have to make a certain entry in one of the federal 1099-R pension screens. Go to that 1099-R:
Federal Taxes tab; Wages & Income; I'll choose what I work on; under Retirement Plans and SS update IRA, 401(k), Pension...; Edit that 1099-R; be sure you have "MD" in Box 13; click through 3-4 screens until you get to Where Is This Distribution From? Be sure you have selected Active duty military retirement. That tells TT/Maryland to compute that deduction for you.