Yes, this is true.
Life needs some conditions, such as :
-it can't be too cold: many life processes can only happen in a certain temperatures and if it's too cold, they won't happen.
-it can't be too warm either: life also doesn't thrive in too high temperatures.
This means that the planet needs to be in a certain distance from the Sun to develop life - the statement is correct