This was said a couple of days after the questions were asked at the mount of the Olives. Even then, Jesus only said he was going away. The Jews were promised a Messiah that would restore their kingdom and this Messiah was to be their king forever. They never expected the Messiah to leave once he arrived.
The following verses will show that the disciples had no concept of a "second coming" when they asked Jesus when will these things happen, and what will be the sign of Your coming, and of the end of the age (Matthew 24:3).
On the next day, when the large crowd that had come to the feast heard that Jesus was coming to Jerusalem, they took the branches of the palm trees and went out to meet Him, and began shouting, “Hosanna! Blessed is He who comes in the name of the Lord, indeed, the King of Israel!” Jesus, finding a young donkey, sat on it; as it is written: “Do not fear, daughter of Zion; behold, your King is coming, seated on a donkey’s colt.” These things His disciples did not understand at the first; but when Jesus was glorified, then they remembered that these things were written of Him, and that they had done these things for Him. (John 12:12-16)
Now He was saying this to indicate what kind of death He was going to die. The crowd then answered Him, “We have heard from the Law that the Christ is to remain forever; and how is it that You say, ‘The Son of Man must be lifted up’? Who is this Son of Man?” So Jesus said to them, “For a little while longer the Light is among you. Walk while you have the Light, so that darkness will not overtake you; also, the one who walks in the darkness does not know where he is going. While you have the Light, believe in the Light, so that you may become sons of Light.” (John 12:33-36)
Simon Peter said to Him, “Lord, where are You going?” Jesus answered, “Where I am going, you cannot follow Me now; but you will follow later.” Peter *said to Him, “Lord, why can I not follow You right now? I will lay down my life for You.” Jesus replied, “Will you lay down your life for Me? Truly, truly I say to you, a rooster will not crow until you deny Me three times. (John 13:36-38)
Thomas said to Him, “Lord, we do not know where You are going; how do we know the way?” Jesus said to him, “I am the way, and the truth, and the life; no one comes to the Father except through Me. (John 14:5-6)
“But now I am going to Him who sent Me; and none of you asks Me, ‘Where are You going?’ But because I have said these things to you, grief has filled your heart. But I tell you the truth: it is to your advantage that I am leaving; for if I do not leave, the Helper will not come to you; but if I go, I will send Him to you. And He, when He comes, will convict the world regarding sin, and righteousness, and judgment: regarding sin, because they do not believe in Me; and regarding righteousness, because I am going to the Father and you no longer are going to see Me; and regarding judgment, because the ruler of this world has been judged.
“I have many more things to say to you, but you cannot bear them at the present time. But when He, the Spirit of truth, comes, He will guide you into all the truth; for He will not speak on His own, but whatever He hears, He will speak; and He will disclose to you what is to come. (John 16:5-13)
His disciples said to one another, “What is this that He is telling us, ‘A little while, and you are not going to see Me; and again a little while, and you will see Me’; and, ‘because I am going to the Father’?” So they were saying, “What is this that He says, ‘A little while’? We do not know what He is talking about.” Jesus knew that they wanted to question Him, and He said to them, “Are you deliberating together about this, that I said, ‘A little while, and you are not going to see Me, and again a little while, and you will see Me’? Truly, truly I say to you that you will weep and mourn, but the world will rejoice; you will grieve, but your grief will be turned into joy! Whenever a woman is in labor she has pain, because her hour has come; but when she gives birth to the child, she no longer remembers the anguish because of the joy that a child has been born into the world. Therefore you too have grief now; but I will see you again, and your heart will rejoice, and no one is going to take your joy away from you. (John 16:17-22)
So the other disciple who had first come to the tomb also entered then, and he saw and believed. For they did not yet understand the Scripture, that He must rise from the dead. (John 20:8-9)
“As for you, let these words sink into your ears: for the Son of Man is going to be handed over to men.” But they did not understand this statement, and it was concealed from them so that they would not comprehend it; and they were afraid to ask Him about this statement. (Luke 9:44-45)
Now He took the twelve aside and said to them, “Behold, we are going up to Jerusalem, and all the things that have been written through the prophets about the Son of Man will be accomplished. For He will be handed over to the Gentiles, and will be ridiculed, and abused, and spit upon, and after they have flogged Him, they will kill Him; and on the third day He will rise.” The disciples understood none of these things, and the meaning of this statement was hidden from them, and they did not comprehend the things that were said. (Luke 18:31-34)
For He was teaching His disciples and telling them, “The Son of Man is to be handed over to men, and they will kill Him; and when He has been killed, He will rise three days later.” But they did not understand this statement, and they were afraid to ask Him. (Mark 9:31-32)