If you have started to feel that warfare in general - or a specific operation - is morally wrong, then you could be experiencing a 'conscientious objection'. You can have a conscientious objection without knowing it straight away. It just means that carrying on as a soldier feels very strongly at odds with what your conscience is telling you to do.
If this is you, then you have a right to apply formally to your Commanding Officer but you have to provide evidence for your conscientious objection. The chain of command makes a decision; if your application is rejected there is a right of appeal.
This is not an easy option as it can put you into conflict with your mates and with the army (the army doesn't want soldiers leaving on grounds of conscience in case others get the same idea).
Because it's not an easy route out, most soldiers in this position find other ways to leave the army if they can, but some apply for conscientious objector status because the principle is important to them.