I recognize that you have appealed to the wording in sripture of John 17:2 and John 6:37. Only recently have I come to see these verses in a differerent light. I am considering the posibility these passages refer to predestination.
There is a sense that I could say that a tree has a burden of fruit and there are good and bad apples on the tree. On the one hand, God "shakes the tree" and Jesus holds out a basket. God's predestined hand guides only the good apples into Jesus' basket.
On the other hand, God could shake the tree containing both good and bad into a receiving net. The bad are gathered out and disposed of and the remaining good are directed into Jesus' receiving basket.
I believe that God's word in its entire counsel does not contradict. Help me to understand that Jesus mentions He does not pray for the world (kosmos) in John 17:9 but God so loved the world (kosmos) in John 3:16. Obviously, by internal evidence alone, the kosmoi of these passages must be a different entity.
Would you consider "..those whom You have given Me.." of John 17:9 to be all the Elect? Or only the disciples (the 12 whom Jesus called to follow Him during His earthly ministry)?
John 17: 2 seems to be less restrictive, that "as many as" most likely extends to individuals beyond the immediate 12.