There are only two scenes in a garden in all four gospels and both of them are in John: the garden of Gethsemane (chapter 18) and the garden of resurrection (chapter 20-21).
The other character in the garden scene in chapter 18 is Judas, whom John is likening to the serpent. John indicates that he is an image of the serpent in two ways: 1) that was the only other man character in the original garden scene in Gen. 3 (although the woman was there, there is no woman here because of the theological thesis - Jesus is accomplishing what the primeval couple failed to do. After the work is done and we re-renters into the garden, the woman is there, Mary, an image of the new Adam’s bride) and 2) the posture of Judas. The narrator gives particular attention to Judas’ two postures.
First, the narrator tells us that that Judas was “standing” (18:5) like the serpent in Gen. 3. Second, after Jesus speaks his word Judas falls to the ground (18:6), the original curse of the serpent. In Gen. 3, the serpent is cursed to the ground by God, here it is Jesus’ action.
Jesus bloodlessly defeats the new Satan by his words, the same words that brought the creation into being (John 1:1-3).
(Interestingly, John also indicates that the garden of Gethsemane scene alludes to the original garden scene by indicating that there are swords and fire (18:3), like the flaming swords of the cherubim in Gen. 3)