Revelation 201. And I saw an angel coming down out of heaven, having the key to the Abyss and holding in his hand a great chain.
2. He seized the dragon, that ancient serpent, who is the devil, or Satan, and bound him for a thousand years.
3. He threw him into the Abyss, and locked and sealed it over him, to keep him from deceiving the nations anymore until the thousand years were ended. After that, he must be set free for a short time.
4. I saw thrones on which were seated those who had been given authority to judge. And I saw the souls of those who had been beheaded because of their testimony for Jesus and because of the word of God. They had not worshiped the beast or his image and had not received his mark on their foreheads or their hands. They came to life and reigned with Christ a thousand years.
5. (The rest of the dead did not come to life until the thousand years were ended.) This is the first resurrection.
6. Blessed and holy are those who have part in the first resurrection. The second death has no power over them, but they will be priests of God and of Christ and will reign with him for a thousand years.
7. When the thousand years are over, Satan will be released from his prison
8. and will go out to deceive the nations in the four corners of the earth--Gog and Magog--to gather them for battle. In number they are like the sand on the seashore.
9. They marched across the breadth of the earth and surrounded the camp of God's people, the city he loves. But fire came down from heaven and devoured them.
10. And the devil, who deceived them, was thrown into the lake of burning sulfur, where the beast and the false prophet had been thrown. They will be tormented day and night for ever and ever.
11. Then I saw a great white throne and him who was seated on it. Earth and sky fled from his presence, and there was no place for them.
12. And I saw the dead, great and small, standing before the throne, and books were opened. Another book was opened, which is the book of life. The dead were judged according to what they had done as recorded in the books.
13. The sea gave up the dead that were in it, and death and Hades gave up the dead that were in them, and each person was judged according to what he had done.
14. Then death and Hades were thrown into the lake of fire. The lake of fire is the second death.
15. If anyone's name was not found written in the book of life, he was thrown into the lake of fire.
KJV Luke 10:20
Notwithstanding in this rejoice not, that the spirits are subject unto you; but rather rejoice, because your names are written in heaven.
You think that Revelation 20:6 "Blessed and holy are those who have part in the first resurrection..." refers only to Revelation 20:4 "I saw the souls of those who had been beheaded...", which is why you highlighted it in that way.
Let me highlight it another way:
I saw thrones on which were seated those who had been given authority to judge. And I saw the souls of those who had been beheaded because of their testimony for Jesus and because of the word of God.
Taken this way, the judges and the martyrs are not necessarily the same group.