The designation of "length" is very confusing. There are:
Rifle length barrels which are 20" long.
Mid length barrels which are 18" long.
Carbine length barrels which are 16" long.
Carbine length barrels which are 14" long.
The list is almost infinite and none of the terms are standard.
Then there is the gas system. These are:
Rifle gas system.
Mid length gas system.
Carbine length gas system.
These are not related to the barrel length at all. In fact, you can have a rifle length gas system on a carbine length barrel. I've never seen one, but it would fit. The carbine gas system is ~7", the mid is ~9.5" and the rifle is ~12.5". It's anyone's guess where the measurement is supposed to be taken from. It's enough to know that if you get those measurements close, you can then use the terminology to buy matching components.
I got lucky and guessed that I had a mid length when I bought my free float forearm. It fit like I wanted it too.
Welcome to the wonderful world of upgrading your gun. We here at S-W Forums like to call this the "rabbit hole" and it's deep.