Jesus was certainly aware that He would spend forty days with His disciples after His resurrection, time in which He would have been well able to enjoy a glass of wine with them. But the first part of His statement seems to have been a vow, or at least a strong promise, that He would abstain from wine until after the time of their resurrection.
It may be significant then that, just before His crucifixion, once He realized what He was being given, He refused the sour wine and gall mixture that was offered to Him: "They gave Him sour wine mingled with gall to drink. But when He had tasted, He would not drink" (Matthew 27:34; see also Mark 15:23; Luke 23:36).
From our human points of view, we may think that a mere taste of this foul-tasting cocktail would not have caused Jesus to break His vow—that it could hardly be construed as "drinking of the fruit of the vine" with His disciples. Jesus, however, looked at things from God's point of view, and He knew that all that His Father had assigned for Him to do was to be carried out perfectly, and not with an "oh, that should do" attitude.
The Greek verb for "taste" in Matthew 27:34 is geuomai, which can mean "to perceive the flavor of," suggesting that perhaps Jesus did not actually taste the mixture at all. In the haze of His agony, He may not have been aware of what the Roman soldier was holding up to Him until it reached His lips, and in that split-second, He recognized it for sour wine. In any case, a taste cannot be considered a drink.
Later, as His human life moved into its final moments, He was offered sour wine a second time: "Immediately one of them ran and took a sponge, filled it with sour wine and put it on a reed, and offered it to Him to drink" (Matthew 27:48; see also Mark 15:36; John 19:29-30).
These "drink offerings" of sour wine and gall perfectly fulfilled David's prophecy of Psalm 69:21: "They also gave me gall for my food, and for my thirst they gave me vinegar to drink."