Doesn’t the Bible tell us that the War of Gog and Magog will happen at the very end of time—after the Rapture, after the Tribulation, after the Battle of Armageddon, and after the thousand-year reign of Christ on earth—not before all these things as you have described?
Revelation 20:7-10 does speak of another War of Gog and Magog that occurs at the end of time, after all these other events. But this is a second war, not the war referred to by Ezekiel 38–39. We know this for several reasons.
First, Ezekiel’s war is described as occurring relatively soon after the rebirth of the State of Israel and the ingathering of the Jewish people from around the world (Ezekiel 36–37). The war in Revelation, by contrast, occurs after Jesus has reigned on earth for a thousand years.
Second, Ezekiel’s war involves a fearsome but limited coalition of countries that surround Israel, as we learned in earlier chapters. The war in Revelation involves all the nations from “every corner of the earth” coming to attack Israel (Revelation 20:8).
Third, after Ezekiel’s war, life continues. Bodies are gathered and buried for seven months, weaponry is gathered and burned for seven years, and Ezekiel 40–48 describes the Temple that will be built. By contrast, the war in Revelation is followed immediately and literally by the end of the world. Satan and his followers are judged and thrown into the “lake of fire” (Revelation 20:10). The heavens and earth are destroyed. A completely new heaven and a new earth are created, and followers of Christ will live on this new earth for the rest of eternity.