You can probably get out of it, but you might take a loss on the deal...
Talk to a lawyer. Unless the contract explicitly says in one oway or another that acceptance into military service will void the contract, you will most likely incur some type of penalty.