So when a soldier goes off to war it is immoral for him to have sex with his wife and have child???
Now you've burnt the barn down...
It is noteworthy that you are asking these sorts of questions. If you are serious in your inquiry then go ask a priest, because only God determines what is moral and what is immoral, and only the Church has the authority to interpret Public Revelation.
Straw men, straw men everywhere, so let's all have a fire. Look, this is a 15 year-old kid who wanted instant gratification. He took little thought for the consequences, since he figured he'd be dead soon. This is far different from a soldier who is hardly as certain to die as a terminal cancer patient. Moreover, the soldier would have a small pension were he to fall in battle.