You can be sure if it is a male by checking for the little bump on inside of legs, above toes, that is the developing spur. This starts growing outward, looking something like a color-less mole, at about 3 months and becomes larger & elongated over time.
You can sometimes sex the chicks by checking their vents. It's easier after they are at least 3-6 weeks old. I found instructions online through Google.