Jesus only seemed to have a body, but he was actually only a divine spirit appearing to be a body.
This teaching comes from dualistic outlook which understands matter as evil by nature as opposed to the spiritual which is seem to be good. As such it was impossible that God could not be associated with matter; and that God, being perfect and infinite, could not suffer.
Therefore, God as the word, could not have become flesh per John 1:1, 14, “In the beginning was the Word, and the Word was with God; and the Word was God . . . And the Word became flesh, and dwelt among us . . . ” This denial of a true incarnation meant that Jesus did not truly suffer on the cross, and that He did not rise from the dead.
Docetism was as such a very early Heresy, and the Post Apostolic Fathers argued against it.
Ignatius of Antioch (died 98/117) and Irenaeus (115-190), and Hippolatus (170-235) wrote against the error in the early part of the second century.
Docetism was condemned at the Council of Chalcedon in 451.
The basic principle of Docetism is refuted in 1 John 4:2-3. “By this you know the Spirit of God: every spirit that confesses that Jesus Christ has come in the flesh is from God; and every spirit that does not confess Jesus is not from God; and this is the spirit of the antichrist, of which you have heard that it is coming, and now it is already in the world.”
Also, John 7, “For many deceivers have gone out into the world, those who do not acknowledge Jesus Christ as coming in the flesh. This is the deceiver and the antichrist.”
The denial of the Christology of John’s Gospel, and the New Testament as a whole. See John 1:1-18.