A gas giant can form as close as you want it, really. WASP-18b is only a little more than .02 AU from its star, and it's probably around 10 times the mass of Jupiter.