The Jews then responded to him, “What sign can you show us to prove your authority to do all this?” Jesus answered them, “Destroy this temple, and I will raise it again in three days.” They replied, “It has taken forty-six years to build this temple, and you are going to raise it in three days?” But the temple he had spoken of was his body. After he was raised from the dead, his disciples recalled what he had said. Then they believed the scripture and the words that Jesus had spoken.
Here is another reminder that this gospel is thematically rather than chronologically arranged. This was a charge brought against Jesus at his trial. It would not have been sensible to bring a charge about something he had said three years ago; they would have gone for a current statement made only a few days ago.
The Jews were notorious for taking things literally and not seeing the spiritual content of the statement as John explains. He was not talking about the literal Temple but about the Temple of the Holy Spirit, his body.
Here again we have the same theme: the old has gone; the new has come. Temple worship with its animal sacrifice was to end; the new covenant would be based on the sacrificial death of Jesus Christ.