2 Chronicles - Chapter 35
King Josiah ends his life in an act which is against the word of God:
"Josiah, however, would not turn away from him, but disguised himself to engage him in battle. He would not listen to what Necho had said at God’s command but went to fight him on the plain of Megiddo. Archers shot King Josiah, and he told his officers, ‘Take me away; I am badly wounded.’ So they took him out of his chariot, put him in his other chariot and brought him to Jerusalem, where he died."
God used the Gentile pharaoh Necho to tell Josiah not to fight against the Egyptians. However, Josiah prepared for battle, against the will of God, on the plain of Megiddo. The result was the death of the King.
In Revelation we see Kings gathering together on the plain of Megiddo to stand against Jesus:
"Then they gathered the kings together to the place that in Hebrew is called Armageddon."
The result for the them is the same as for Josiah, and we read of their deaths in Revelation 19:
"Then I saw the beast and the kings of the earth and their armies gathered together to wage war against the rider on the horse and his army. ... The rest were killed with the sword coming out of the mouth of the rider on the horse, and all the birds gorged themselves on their flesh."