Here "they" refers to the people with clubs and swords that came with Judas and the religious leaders.
"grabbed Jesus, and arrested him"