I'm not sure I really understand what you are asking about. 20', and 18" barrels are made, as are 16" barrels. You can mount a shorter hand guard on a longer barrel, it will just look funny.
IF you wanting to have the hand guard cover the gas block and tube, and are asking whether a 20, 18, or 16" barrel can have a carbine length gas system, the answer is yes. Normally, barrels of 16" or less are now considered "carbine" length barrels.
When the AR15 originally came out, the 20" barrel was thought to be much handier than the barrel lengths from the M14/M1A. The rifle was designed as a sort of "carbine" because it was so much lighter and shorter than the M-14. But times and definitions change, and not too long after adoption of the 20" barreled rifle by the military, special forces wanted shorter barrels of 16", 14" and so on, with shorter gas systems.
It is possible to mount a 6" forend (free floated) hand guard on a 20" barreled rifle, but it will look goofy as all get out. However, the GI hand guard system uses a mounting plate that ls located just behind the front sight to hold the front end of the hand guards, while the rear of the hand guard is held in place by a spring mechanism.
If you are trying to mount a GI style handguard, it will require placing a forward mounting plate behind the front sight in addition to the spring mechanism just forward of the upper receiver. There are shorter GI hand guards (not free float tubes) made for carbines, but because of the required forward mounting plate, you will be stuck with having the plate mounted behind the front sight tower as on GI carbine systems. IIRC, the GI hand guards are only 8-10" long..I can't remember the specific length, but they are for the GI length gas system and front sight tower setup.