Lining up the gas tube is not something to worry about.
The barrel is held in place by a nut. That nut has "teeth" around the outside.
A gap in the teeth needs to line up with the hole through the upper receiver that the gas tube passes through.
You tighten the barrel nut to ~30 ft-lbs, and hopefully one of the gaps will be coming up to lining up with the hole. If not, you can tighten more (up to 80 ft-lbs) to get the next gap into line.
Once the hole gap is close to lined up, put the gas tube in place -- or you can buy a special tool (otherwise known as a bit of sawn-off gas tube) to use in its place. The, take the bolt carrier, without the bolt in place, and slide it into the upper.
Watch as the gas key (the thing on top of the carrier) engages the gas tube. You should feel only the slightest resistance as the gas tube slides into the key, and the gas tube should NOT move at all. If it moves one way or the other, watch which way it moves - you will need to tighten/loosen the barrel nut just a touch to move the tube so that it lines up with the gas key.
Once the bolt carrier slides in with minimal friction, and no gas tube movement your gas tube is aligned.
Its actually pretty easy, and also pretty intuative once you start looking at it.
The hardest part may be getting the nut "gap" to align within the torque range (30 to 80 ft-lbs), and also measuring that torque. You can try backing off the nut and re-tightening, often that will be enough. Don't get fixated on the actual torque value. The barrel doesn't have to be held all that tight to work - it just really needs to be tight enough not to come loose later. Overtightening can damage the thread on the upper, and/or distort it, so just don't go nuts and over-torque the barrel nut.