Minchas Chinuch: Why was Kuzbi killed?

Minchas Chinuch: A non-Jew is killed by sword when violating one of 7 Noachide laws (two witnesses not required, nor 23 judges). Animal in bestiality is stoned by court of 23. How is non-Jewish woman killed when with Jewish man who is punished by zealot? Pinchas killed Zimri by sword.

In the zechus of Ohr Hachaim’s yahrzeit.