Why do planets form where they do?
What determines the orbital distance from a star at which planetary material will coalesce? Is it just gravity?
It depends on what sort of planet is forming, and it also depends on what your star is made of, how big it is and how much stuff is left behind. If you have a planet that's made of gases and volatiles, like Jupiter or Saturn, they're only going to condense much further out from the sun. They tend to get swept out by the winds from the young star forming in the nebula and condensing down to form the planetary system. If they're made of solid, rock material, like Earth, Mercury, Venus or Mars, they tend to coalesce much closer in.