After the thousand years of peace, somewhere between Revelation 20 and 21 is when we are taken into heaven or raptured. It doesn't specifically say; however, Revelation 21:2 says this:
"And I saw the holy city, new Jerusalem, coming down out of heaven from God, prepared as a bride adorned for her husband."
I've read this verse quite a few times, but until today, I pictured heaven and earth connected by a city, but that's not what it says. The new Jerusalem is us, God's holy people, the bride of Jesus! To be coming out of heaven, somehow, we had to get there. Now, if you inject the picture of Paul's account in 1 Thessalonians 4:13-18, the vision becomes more apparent. If you have time, read this whole section in your Bible.
Then we who are alive, who are left, will be caught up together with them in the clouds to meet the Lord in the air, and so we will always be with the Lord. 1 Thessalonians 4:17
Revelation 19:17-18 also matches up to Jesus's account in Matthew 24:29-31; first tribulation and the death of the bad guys, then the vultures gather to eat.
"Wherever the corpse is, there the vultures will gather." Matthew 24:28
And he will send out his angels with a loud trumpet call, and they will gather his elect from the four winds, from one end of heaven to the other. Matthew 24:31
The timeline makes more sense to me now; I hope this clarifies it for you too.