The fact is that the immediate language in John 2 is figurative since Jesus was comparing his body with the temple and spoke of it in the third person. The point is Jesus' resurrection from the dead as a sign to his unbelieving fellow Israelites, not how it would happen.
Note that John did not go on to say “So when Jesus raised himself from the dead” but “when he was raised from the dead,” i.e., by God. This is typical resurrection language for Jesus throughout the rest of the NT. This is what the disciples preached and the NT is witness to more than 60 times. They never preached Jesus raised himself from the dead.
Note v. 22: “his disciples remembered that he had said this, and they believed the scripture and the saying that Jesus had spoken.”
Again, the issue is to believe what Jesus had said about his resurrection from the dead.
Furthermore, the typical resurrection language for Jesus throughout the NT clearly shows that someone else raised him from the dead, namely God the Father. This is what the disciples preached. They never preached Jesus raised himself from the dead.
As Walter Balfour said in his Three essays: On the intermediate state of the dead:
“This the apostles never asserted, but constantly affirmed that God raised him from the dead. If he was the Supreme God he must have raised himself…if the doctrine of disembodied spirits is true, why could not Christ’s disembodied spirit have raised his body from death, allowing the power by which he raised others was derived…unless all his power ceased at his death? Christ always declared his dependence on God for life, and all he possessed.”[1]
Finally, whatever role Jesus played in his own resurrection is to be viewed in terms of the destiny foretold about the Messiah in the OT. That is, by choosing to keep himself as the perfect lamb sacrifice, “without spot or blemish,” he could repeat the words of the Psalmist and be assured that God “would not abandon me in the grave.”
[1] The resurrection from the dead and the Greek terms rendered Judge, Judgment, Condemned, Condemnation, Damned, Damnation, etc., in the New Testament, By Walter Balfour, p 133
The above article was taken from here.