Gas length does not need to equal stock length.
You can run rifle, mid, carbine, pistol, or specialty gas length just make sure you buy the correct gas tube.
The stock/buffer tube length is totally separate but one again needs to be paired with the correct/same buffer and spring
So a carbine length tube, spring, and buffer
Or rifle tube, spring, and buffer
Carbine buffers have quite a few weights - std, h2, and h3, there are also specialty weight carbine buffers (ultralight/1oz and h4 also)
There are also heavier weight springs too
My suggestion is use a carbine tube, spring, and std weight carbine buffer with what ever length gas system your 20" barrel has (normal for a 20" barrel is rifle length gas)
If it's over gassed then buy an adjustable gas block and cut down the gas a bit