"For this is what we tell YOU by Jehovah’s word, that we the living who survive to the presence of the Lord shall in no way precede those who have fallen asleep [in death]; 16Â because the Lord himself will descend from heaven with a commanding call, with an archangel’s voice and with God’s trumpet, and those who are dead in union with Christ will rise first" (1 Tessalonians 4:15,16. Bible) :
This biblical passage refers to christians resurrected in the Heaven, the number of them is 144 000 :
"And I saw, and, look! the Lamb standing upon the Mount Zion, and with him a hundred and forty-four thousand having his name and the name of his Father written on their foreheads. 2Â And I heard a sound out of heaven as the sound of many waters and as the sound of loud thunder; and the sound that I heard was as of singers who accompany themselves on the harp playing on their harps. 3Â And they are singing as if a new song before the throne and before the four living creatures and the elders; and no one was able to master that song but the hundred and forty-four thousand, who have been bought from the earth" (Revelation 14:1-3. Bible).
"When the Son of man arrives in his glory, and all the angels with him, then he will sit down on his glorious throne. 32Â And all the nations will be gathered before him, and he will separate people one from another, just as a shepherd separates the sheep from the goats. 33Â And he will put the sheep on his right hand, but the goats on his left" (Matthew 25:31-33. Bible) :
This text refers to judgement which will happen just before the Great Tribulation ; Jesus-Christ will judge the actual humankind. The result of this judgment is written her :
"And these will depart into everlasting cutting-off, but the righteous ones into everlasting life.” (Matthew 25:46. Bible).
Revelation 20:5 refers to other period of judgement ; the judgement of the period 1000 years, where the resurrected humankind on earth, will be judged (John 5:28,29 too).
The first resurrection refers to the complete 144000 group of christians in the heaven. And the second resurrection refers to the complete resurrected humankind judged in the end of the 1000 years period.
"And I saw a great white throne and the one seated on it. From before him the earth and the heaven fled away, and no place was found for them. 12Â And I saw the dead, the great and the small, standing before the throne, and scrolls were opened. But another scroll was opened; it is the scroll of life. And the dead were judged out of those things written in the scrolls according to their deeds. 13Â And the sea gave up those dead in it, and death and Ha′des gave up those dead in them, and they were judged individually according to their deeds. 14Â And death and Ha′des were hurled into the lake of fire. This means the second death, the lake of fire. 15Â Furthermore, whoever was not found written in the book of life was hurled into the lake of fire" (Revelation 20:11-15. Bible).
What Is God’s Purpose for the Earth? :
http://www.watchtower.org/e/bh/article_03.htm