We read in Holy Scripture that "In my Father's house are many mansions…" (John 14:2) of which obviously this house with many mansions is nothing like a house on planet earth, for when we discard our earthly bodies, we become sprit, and spirit has no body, therefore this house of many mansions is actually a celestial house in which each spirit finds and gravitates to the mansion that matches well with their needs and the conditions of their spirit, so that the spirit can revive and revivify itself within a domain that encompasses all that spirit has need of.
On earth, too many people are completely identified with their body so that they think and believe that their body is all that will ever be, but everything physical, most definitely has a beginning and all beginnings most definitely have defined endings, so that the body is more appropriately seen as what it really is which is a vessel for our spirit, and therefore, if we are wise, we should concentrate on feeding correctly that which is eternal, rather than that which is temporal.
The mansion that awaits us matches to what we have or have not accomplished with our free will on this planet, for the spirit is not able to abide in rooms in which it has not yet achieved the growth needed to be in harmony with others in such rooms, of which lacking such harmony, that spirit must become what it should be in order to be able to dwell successfully in any of the mansions within God's great house, for in God, there is only perfection, all others that lack such, must become such, for untruth can never be truth, hate can never be love, and wrong can never be right.
The spirit is never punished, it isn't even precluded from all forms of movement and complete free will, what is happening, though, is that having not the full capacity, to be truth, love, and right, such a spirit is unable to access various parts of God's great house, for it has not the correct demonstrated mindset to accomplish such, and will not be able to make its entry, until that spirit is completely developed and completely in accord.
This earth is our proving ground, an opportunity to mold our body and our mind to perform deeds and actions on earth that are in conformance to the heavenly attributes of selflessness, generosity, kindness, and steadfastness, of which, the more that we accomplish such, the more doors of God's mansion are welcoming to us, for what we do, for a certainty matters, and who we really are, is clearly known by all.
What we pursue in this world creates the pathway of our actions, and those that take the time to develop and to utilize their true essence will progress, whereas those that do not, will regress, and the spirits that do regress, will when they leave their earthly body know it for a certainty, but even the least of these has a place in God's house, and will always have a mansion, for God deserts no spirit, and those closest to God, only leave God's good house as volunteers to become the prophets that wayward earthly incarnations need to emulate.