If he was punched and elbowed, that is more than bullying. Were the police called? If it was an attack, it seems they should have been called.
Hitting him after the attack would not have been the right choice. If the attack continued, stepping in to keep more damage from being done could have helped.
Not saying anything would also not be the right choice. The truth is always the best choice, but it might have been better to do it in private rather than saying it in front of everyone, including the attacker. It doesn't sound like it was very well handled by those in charge.
P.S. I didn't notice the military part before. Could you have asked to speak to your superior privately? I still think this would have been the best choice.