Peter has just asked Jesus where he was going, and he replied that Peter couldn't follow him yet. Jesus then added that Peter was going to deny him three times.
In today's passage, Jesus is speaking to a group, also addressing their concern about his leaving them behind.
"Don't be troubled," he tells them. He then gives them the basis for confidence, "Believe in God and believe in me".
Their faith in God and in him will allow themselves to remain connected with them even when they no longer can see the physical Jesus. They will remain connected to him. And they don't have to wait to die for this to be true. They will be in relationship with him--as he puts it, they will dwell with him.
I'm curious but haven't looked hard enough to find an explanation of why the word translated as "dwelling places" in the NRSV was translated as "mansions" in the KJB. The Greek noun mone has the same root as the verb translated as 'abide."