Because the Ezekiel 38-39 very clearly says that All Israel will know that Jehovah is the Lord "from that day and forward." That sets the timing as after Daniel's seventieth week and before the millennum. But Revelation 20 very clearly says that Gog will attack after the millennum.
Any way to be sure that the day being talked about is not after the 1000 years?
Yes. Because during the millennium "No more shall every man teach his neighbor, and every man his brother, saying, 'Know the LORD,' for they all shall know Me, from the least of them to the greatest of them, says the LORD. For I will forgive their iniquity, and their sin I will remember no more." (Jeremiah 31:34)
So the day when "the house of Israel shall know that I
am the LORD their God from that day forward." (Ezekiel 39:22) has to be before the time described in Jeremiah 31:34. But Jeremiah 31:34 cannot be at the end of the millennium, for at that time the earth will be destroyed, but of the time of Jeremiah 31, we read:
27 "Behold, the days are coming, says the LORD, that I will sow the house of Israel and the house of Judah with the seed of man and the seed of beast.
28 And it shall come to pass,
that as I have watched over them to pluck up, to break down, to throw down, to destroy, and to afflict, so I will watch over them to build and to plant, says the LORD.
29 In those days they shall say no more: 'The fathers have eaten sour grapes, And the children's teeth are set on edge.'
30 But every one shall die for his own iniquity; every man who eats the sour grapes, his teeth shall be set on edge.
31 "Behold, the days are coming, says the LORD, when I will make a new covenant with the house of Israel and with the house of Judah--
32 not according to the covenant that I made with their fathers in the day
that I took them by the hand to lead them out of the land of Egypt, My covenant which they broke, though I was a husband to them, says the LORD.
33 But this
is the covenant that I will make with the house of Israel after those days, says the LORD: I will put My law in their minds, and write it on their hearts; and I will be their God, and they shall be My people.
34 No more shall every man teach his neighbor, and every man his brother, saying, 'Know the LORD,' for they all shall know Me, from the least of them to the greatest of them, says the LORD. For I will forgive their iniquity, and their sin I will remember no more."
35 Thus says the LORD, Who gives the sun for a light by day, The ordinances of the moon and the stars for a light by night, Who disturbs the sea, And its waves roar (The LORD of hosts
is His name):
36 "If those ordinances depart From before Me, says the LORD,
Then the seed of Israel shall also cease From being a nation before Me forever."
37 Thus says the LORD: "If heaven above can be measured, And the foundations of the earth searched out beneath, I will also cast off all the seed of Israel For all that they have done, says the LORD.
38 "Behold, the days are coming, says the LORD, that the city shall be built for the LORD from the Tower of Hananel to the Corner Gate.
39 The surveyor's line shall again extend straight forward over the hill Gareb; then it shall turn toward Goath.
40 And the whole valley of the dead bodies and of the ashes, and all the fields as far as the Brook Kidron, to the corner of the Horse Gate toward the east,
shall be holy to the LORD. It shall not be plucked up or thrown down anymore forever."
(Jeremiah 31:38-40)