You do not appear to understand Revelation 20 at all.
The sentence “ The rest of the dead lived not, till the thousand years were finished” is a parenthetical explanation of why they are not being resurrected in the First resurrection.
You seem to miss verse 6.
Rev.20:6 "Blessed and holy is he that hath part in the first resurrection: on such the second death hath no power, but they shall be priests of God and of Christ, and shall reign with him a thousand years".
That is the First Resurrection, not the one where the books are opened, and people are judged by their works.
The participants in the first resurrection receive the Grace of the Father because they confessed their sins, and repented, and kept his commandments that were written on their hearts. Those that go to the GWT 1000 years later are not eligible for that grace.
I guess I do NOT understand it!
Where can I read about this FIRST resurrection in the Scriptures?