loosen up the bolts and move the header around till the stud threads into the head.
in a perfect world, you leave the 2 ends studs in place with the gasket behind them, then bring the header up and put the nuts on the studs, install the rest of the bolts and hand tighten them.