Read this carefully and don't just assume that you understand what it is being said, tell God to let you truly understand what is being said...
Even though Yeshua is declaring his deity in John 17, he is talking to his Father as a man to God the Father, but knowing that his Father is the Omniscient God and in God's omniscient the Father knows the number of people that will be saved among men, but he spoke as a man which is why he said as many.
Just like when Yeshua said, but of that day and that hour knoweth no man, no, not the angels which are in heaven, neither the Son, but he Father, now the Yeshua sits at the right hand of the Father with the majesty and holiness and with the transcendent glory of God.
By God, the Father's foreknowledge, he saw that no one would be saved from going to hell, Psalms 53:2-3, unless He intervened, and choose, Eph 1, some of those that would not seek him, to regenerate them to a new spiritual life, that he would have a people that would seek and serve him.
The scriptures are kind of like a puzzle. If you see a piece that has the right colors, and has the right amount of ears, in the right places, you force one of the tight fitting ears into a place that it does not supposed to go, then you will not be able to see the finished picture. I believe you may be pressing an ear too hard, with your thumb.
God is three in one. Jesus being the second one. The only thing that the scriptures tells us that Jesus does not know, is the day and the hour that the heaven and the earth shall pass away, Mark 13:31-32.