The atheists and bible deniers love to talk about how hateful and murderous God is. I suggest the following. I believe that the children that were killed in warfare by the Israelites were taken to heaven with God. Consider this: God knew that if the children of false worshipers and enemies of the Israellites were allowed to grow up, they would become adult idolaters and sinners, and they would eventually spread their influence more fully among the Israellites. Their sinful influence would have destroyed even MORE people in the long run, had they been allowed to live.
Murder is the UNLAWFUL killing of someone. God didn't break His own law. Instead of allowing them to grow up and become adult idolaters and sinner who would eventually die in their sins, He mercifully took them out of that evil future and brought them into heavenly paradise to reside with Him.
It's just my opinion. Take it or leave it. But I think it makes sense.