Through the Holy Spirit John had been transported from the island of Patmos to heaven (Revelation 4:1–2), where he had remained to see all that the Lord had shown him in chapters 4—16 (see Revelation 12:1; Revelation 15:1). Now the same Spirit transports John to “a wilderness.” We are not told how the Spirit moved him. As his presence in heaven was real (as opposed to a dream), so his relocation to a wilderness was real. The same sort of thing happened to Ezekiel (Ezekiel 8:3).
3 And he carried me away in the Spirit into a wilderness, and I saw a woman sitting on a scarlet beast that was full of blasphemous names, and it had seven heads and ten horns.