Numbers 31:17-18 is a passage where Moses commands the killing of all male children and non-virgin women among the Midianite captives, while the virgin girls are to be kept alive