If you are replacing a regular front sight base with the YHM flip-up, the gas block will slide into the exact same position on the barrel and sstop against the handguard cap which you are leaving there for your 2 piece handguards.
Are you using the same old gas tube?
If so, the gas tube will have to be aligned with the gas port on the barrel for it to function.
In order for the gas tube to flow gas, it would also protrude back the same amount into the receiver.
When you set it into place, just make sure it's properly centered so that the gas key (that part screwed to the top of the bolt carrier) will not bind.
The easy thing is to pull the bolt out of your bolt carrier and set it aside.
Now see how the bolt carrier slides into position on the gas tube.
If you hold the gas tube in your thumb and fore finger while you slide the carrier into place, you can feel if the gas tube moves around while the gas key slides on to it.
If it's moving, tweak it around until you have it where it will just sit still while the gas key engages the end of the tube.
The gas tube does not stick very far back into the receiver.