For a 20gl long (make sure it is the "long" version that is longer and not taller), I'd suggest looking at a female Kenyan sand boa. They get about 3' (males are much smaller), are good eaters, don't have picky humidity requirements, etc. They don't even really need hides (they bury themselves in the substrate). It is still great to provide them with options...rocks, climbing branches, etc. but they stay buried most of the time. If you want a snake to watch, then a male king snake will be more visible and active during the day. KSB are easy to handle though and a solid beginner option. If you go with the king, a hide on both the warm and cool end will be needed.
I agree with the poster about about the Accurite thermometer... It is a good choice. A deacent thermostat that doesn't cost a ton, which I have used in the past, is the hydrofarm. It is an "on/off" type thermostat, but seems to work pretty well. I LOVE my herpstats though and think they are the best / safest on the market...They cost a good bit of $$, but are worth it in the long run.
If you are using a glass aquarium, make sure you get a heavy duty mesh top and very good locks / spring locks to keep it on the tank. Many snakes have managed to escape via loose screen tops and a king snake will be an avid climber and probably a good escape artist. Luggage straps may also be a good option to help secure the top of the tank.
Holding proper heat may be difficult and you will need to cover 3 of the sides of the aquarium..it may help to use some form of insulation board for this. If your room temps drop too low (check the care sheet for whatever species you go with), then a heat lamp (I prefer ceramic heat emitters to leave on 24/7) may be in order.