John 14:16 — And I will ask the Father and He will give you another Comforter to be with you forever - the Spirit of Truth.
The Comforter will be with these disciples forever. Jesus promised the Comforter would be with these disciples forever. Muhammad could not be the Comforter because he wasn't born until over 500 years later - following the deaths of these disciples. He was born around 570 and died around 632 AD.
Jesus said he would ask the father,so this means God himself sends down the Holy spirit into the disciples after Christ has gone home to God the father.
John 14:17 — But you know him for he lives with you and will be in you.
The Comforter lives with the disciples already now and will later be 'in' them. The Holy Spirit came to the disciples and indwelt them. Muhammad could not be the Comforter because first he wasn't around at the time when Jesus was speaking to his disciples nor second could he ever be in any of the disciples. The Greek word is 'en', and it means 'right inside'. Jesus is saying that the Comforter will be 'right inside' of the disciples.
So the answer to your question is that because Jesus was with the Disciples,
there was no need to give them the comforter while he traveled and ministered with them.
His divine teachings, and message of the Father and his love was more than enough comfort.
I kind of lost you on this one dude.
There would be no need to be given the gift of the Holy spirit in Heaven,
because we can probably assume that when in Heaven,
we are Holy spirits.