He was referring to His twelve disciples who the Father gave Him.
He did lose Judas.
9 “I pray for them. I do not pray for the world but for those whom You have given Me, for they are Yours. 10 And all Mine are Yours, and Yours are Mine, and I am glorified in them. 11 Now I am no longer in the world, but these are in the world, and I come to You. Holy Father, keep through Your name those whom You have given Me, that they may be one as We are. 12 While I was with them in the world, I kept them in Your name. Those whom You gave Me I have kept; and none of them is lost except the son of perdition, that the Scripture might be fulfilled. John 17:9-12
- Those whom You gave Me I have kept; and none of them is lost except the son of perdition, that the Scripture might be fulfilled.
BY context, those who You gave Me, refer to the twelve disciples, while He was in the world.
Judas was appointed, elected, destined to rule with Christ and the other eleven disciples in the age to come.
28 So Jesus said to them, “Assuredly I say to you, that in the regeneration, when the Son of Man sits on the throne of His glory, you who have followed Me will also sit on twelve thrones, judging the twelve tribes of Israel. Matthew 19:28
- you who have followed Me will also sit on twelve thrones, judging the twelve tribes of Israel.
It's up to us to take the "talents", the gift of a new nature empowered by the Holy Spirit, and make our calling and election sure.
Peter says it this way -
5 But also for this very reason, giving all diligence, add to your faith virtue, to virtue knowledge, 6 to knowledge self-control, to self-control perseverance, to perseverance godliness, 7 to godliness brotherly kindness, and to brotherly kindness love. 8 For if these things are yours and abound, you will be neither barren nor unfruitful in the knowledge of our Lord Jesus Christ. 9 For he who lacks these things is shortsighted, even to blindness, and has forgotten that he was cleansed from his old sins.
10 Therefore, brethren, be even more diligent to make your call and election sure, for if you do these things you will never stumble; 11 for so an entrance will be supplied to you abundantly into the everlasting kingdom of our Lord and Savior Jesus Christ.
- be even more diligent to make your call and election sure, for if you do these things you will never stumble;
Stumble is an important word here, as it means to
depart from Christ in unbelief; Turn away from Christ to another.
JPT