The question contains the correct thought that Jesus was in spirit form when he went to heaven as the referenced scripture reads in I Corinthians  15: 50 “Now this I say, brethren, that flesh and blood cannot inherit the kingdom of God;…”

So when the Apostles and disciples saw Jesus after he was crucified, what did they see? Was it flesh or spirit? We do know that it wasn’t the same body he had before he died because he wasn’t immediately recognized. For example, when Mary Magdalene was at the tomb, “…she turned herself back, and saw Jesus standing, and knew not that it was Jesus.”(John 20:14-16). Yet, when the disciples were together in a closed room, Jesus appeared and said to Thomas, “Reach here your finger and see my hands; and reach here your hand, and put it into My side; and be not unbelieving, but believing.” John 20:27. In the first example, Jesus did not have a body that looked like his former body. In the latter case, Jesus was recognized and he had the wounds from the cross. How can these two accounts be harmonized?

We are aware of many times where the spirit angels appeared as men. Likewise, Jesus was a spirit that took on a fleshly form when he appeared to his Apostles/disciples because twice he appeared in a closed room, and left without opening the door. (John 20:19 and 20:26). Spirits have the ability to go through walls and doors.

It was Jesus, the spirit that went up to heaven.