If you are attempting to become chaste, it is absolutely essential to avoid pork, since pork is a container of very potent lustful energy that will overwhelm you and keep you addicted to lust.
So, become clever. Most militaries respect the religious diets of the members. Adopt a religious diet, and they will feed you accordingly. If that is not possible, then simply do not eat the pork. Either fast, or eat the other food only.
No one can force you to eat it. What you eat is up to you. But remember: you are what you eat!