I think so!
He gave the order. Jesus is God and always has been from before time was created. When God gave the order to kill the Canaanite, Christ was there.
Christ is not a pacifist. Evil is to be resisted and fought (warred against) no matter where it exists.
And if Jesus was against the death penalty, why did he pay it for us?