Judas had told the crowd to arrest the man whom he would kiss. A kiss on the cheek or hand was a common form of greeting in the Middle East, so this was not unusual. Judas would affectionately greet the man the guards were to arrest and lead away.
Jesus’ use of the word friend for Judas was an act of love on Jesus’ part, which shows that God’s love never leaves even the apostate.
But it carried a twist of irony in that both Jesus and Judas knew of the treachery. Jesus was still in charge, and his words do what you have come for amount to him giving permission for the event to take place. The religious leaders had not arrested Jesus in the Temple for fear of a riot. Instead, they had come secretly at night, under the influence of the prince of darkness, Satan himself. Jesus offered no resistance and was duly arrested. Everything was proceeding according to God’s plan. It was time for Jesus to suffer and die.