1. Revelation 20:4 (ESV)
  2. Exposition

Are “those who had not worshiped the beast or its image” a different group than the beheaded?

Revelation 20:4 (ESV)

4 Then I saw thrones, and seated on them were those to whom the authority to judge was committed. Also I saw the souls of those who had been beheaded for the testimony of Jesus and for the word of God, and those who had not worshiped the beast or its image and had not received its mark on their foreheads or their hands. They came to life and reigned with Christ for a thousand years.

The Greek does not require that this be seen as a second group. What is emphasized is that they resisted the pressure they experienced from the second beast to worship the first (Revelation 13:12). That resistance resulted in their deaths (Revelation 13:15), be it by beheading or in some other way.