Jesus told her, “Don't hold on to me! I have not yet gone to the Father. But tell my disciples that I am going to the one who is my Father and my God, as well as your Father and your God.”
and he has always known who his chosen ones would be. He had decided to let them become like his own Son, so that his Son would be the first of many children.