Pen them up for 6 weeks. When you do start leaving them out again, be sure to put them in the coop every night.
You can coop train them with treats or by herding them in. Make sure that you start early enough that you can get them locked in the coop before dark.