Moroni was given power by the chief judges and the voice of the people (v. 34) to establish order. By doing so, they gave Moroni power to declare marshal law on the Amalickiahites. Their threat was so real, that reconciliation or extermination was the only option.
“What may at first seem to be harsh measures was really a very humane and just approach, and it was remarkable for two reasons. First, how many times in history does one find prisoners of war given a chance to swear their allegiance to the government and then freed, even though the war still continues? Second, once again we see the great importance these people placed on making and keeping oaths. In today’s society, many would sear such an oath to escape death, with no intent of ever keeping it. But the, the oath was a very important and sacred thing to the people.” (Book of Mormon Student Manual, 1981, pp. 330-1)
Hugh Nibley
“The fiction has been diligently cultivated that Moroni on this occasion put all the pacifists to death. Those put to death were not those who had refused to take up arms to defend their country, but those who had taken up arms to attack it and who were on their way to join the enemy across the border, glad in their hearts when they heard that the Lamanites were coming down to battle against their country; they were dissenters to the enemy. Pacifists? They were all members of Amalickiah’s army, armed to their teeth on their way to join the enemy when Moroni caught them. ’And … whomsoever of the Amalickiahites that would not enter into the covenant, … he caused to be put to death; and there were but few’ (Alma 46:35). Armed violence, not pacifism, had been their program from the beginning.” (Approaching Zion, p. 98 – 99)