You can "buy" your military time to allow it to factor into your Civil Service time.
You can't retire at 20 years. I think the current age is 60, but it has been changing some. Federal Gov't retirement has a smaller pension and uses the Thrift Savings Program. Basically, you get 1% of your pay (highest 5 years averaged) times the number of years you work. If you work 30 years, you get 30% of your pay plus whatever is in your Thrift Savings.