It is not always easy to understand exactly what the Scriptures mean. A possible explanation to John 20:17 may be as follows. In previous discussions with his disciples, Jesus said: “In My father’s house are many dwelling places: if it were not so, I would have told you; for I go to prepare a place for you. And if I go and prepare a place for you, I will come again, and receive you to Myself: that where I am, there you may also be,” (John 14:2, 3).
When Mary Magdalene saw the Lord alive again, after having witnessed his death on the cross, she may have thought that he had come back for his disciples, to take them with him. But Jesus assures her that he has not yet ascended to heaven, to his Father, that he, therefore, has not yet “prepared a place for them”. Hence he is asking Mary to stop “clinging to [him]”, (closer to the Greek than “Do not touch me”), and, rather, go and tell the other disciples that he is soon going to the Father to prepare a place for them: “go to my brethren and say unto them, I ascend unto my Father and your Father, and to my God and your God.”
Having fulfilled his mission on earth faithfully, and, as a reward, having been granted a divine resurrection, Jesus is able to say to his followers: “ All authority is given unto me in heaven and in earth,” (Matthew 28:18). His disciples may now rest assured that he will be in a position to ready things for them.