It just depends on what the planet is made of from when it was formed. Distance from the star has little to do with it.
Distance actually does have something to do with it. If a planet is not in a stable orbit around a star in the "Goldilocks" zone, it would be difficult to develop a lush biosphere. Too close in, and all the water evaporates and one ends up with a desert world, like Venus. Too far out, the water is frozen and you get a desertlike planet if there is little water (like Mars) or you get an icy world where life *might* exist but only in an oceanic environment under the ice crust, assuming that it has an active, hot core (like Jupiter's moon Europa) to ensure a liquid ocean exists.
Different stars have different Goldilocks zones too. For a G2V spectral-class/luminosity yellow dwarf similar in mass to good ol' Sol, the Goldilocks zone is obviously at about 1 AU. For more massive, hotter-burning stars the Goldilocks zone would be further out, for dimmer, cooler stars the zone would be closer in, etc.