"he shall not go out in the army": I might think that he does not go out into the army, but he supplies to it weapons, food, and water; it is, therefore, written "and it shall not impose upon him for any thing." I might think (that it may not impose upon him) even if he built a house and inaugurated it, planted a vineyard and redeemed it, betrothed a woman and took her (viz. Ibid. 20:5-6); it is, therefore, written "upon him." It does not impose upon him, but it does impose upon the aforementioned.
Military Exemptions and the Battles People Face
Sifrei Devarim 271:2