Yep, that's about right. If you do it right, schooling can be quite a bit cheaper, but starting is sometimes even less than 20k.
Plus figure in "working" 60+ hours a week and only getting paid for 30-40 of them. It's not uncommon for airlines to fly pilots from city to city to stage them for flights. But they only pay them for the time they are actually touching the controls. So they get up at 3am to catch series of flights, then don't start getting paid until noon.