He's the one confessing, but to a priest, not the police, as he has already been condemned to death.
This "they" is just some impersonal formula used colloquially.
Oh, by the way, original lyrics say "
Al preso número nueve ya lo van a confesar", which makes much more sense.