Please read the entire prayer. It was for all who would come and believe on Him:
Joh 17:20 Neither pray I for these alone, but for them also which shall believe on me through their word;
Joh 17:21 That they all may be one; as thou, Father, art in me, and I in thee, that they also may be one in us: that the world may believe that thou hast sent me.
Pastor, there is nothing contradictory in Jesus’ High Priest prayer before His crucifixion, during His crucifixion, and after His resurrection.
In verse 9 of John 17 Jesus prays:
I pray for them: I pray not for the world, but for them which thou hast given me; for they are thine.
Since the will of Jesus always reflects the will of the Father:
1. Why would Jesus not pray for the world since, according to non-Cal theology, ‘God so loves the world’, meaning every human who ever lived?
How is 'love' manifest to those for whom Christ refuses to pray?
2. Why would Jesus make such a startling negative statement if He loves everyone, including Judas Iscariot?
3. Verses 20 and 21 cited above also limits those for whom Christ prays: He prays only for those who, in the future, will believe on Him.
Therefore, Christ’s prayer on the cross, is perfectly consistent with His prayer in the Garden.
It is limited to those who either now believe or shall in the future believe in Him.
Furthermore, if Christ’s prayer is limited in scope (on behalf of believers only), His atonement which bestows forgiveness of sins is also limited to believers only.
Just as the Jewish High Priest on the Day of Atonement asked the Lord forgiveness for the sins of Israel -- NOT for the world -- in like manner Jesus prays for forgiveness -- NOT for the world -- but for spiritual elect Israel, comprised of Jewish and Gentile believers.
Remember, the Father always hears the prayers of His Son.
Thus, the biblical truths:
I am the good shepherd: the good shepherd giveth his life for the sheep. [i.e., for believers only]
I lay down my life for the sheep. [i.e., for believers only]
Husbands, love your wives, even as Christ also loved the church [i.e., believers only], and gave himself for it; [i.e., for believers only]
Unto him that loved us [i.e., believers only], and washed us [i.e., believers only] from our sins in his own blood.