Many military dogs go on to civilian law enforcement, then retiring to the home of their civilian handlers.
A little googling will show you that there are numerous agencies and organizations out there to facilitate the adoption of retired military dogs, as well as dogs that don't make the cut or don't end up in civilian LE use.
Military working dogs can be adopted by civilians thanks to the passage of bill passed in 2000. The majority of military working dogs are trained for sniffing out explosives and drugs. I don't have 20 posts yet, so I am unable to provide a link, but you can google "Military Working Dog Adoptions" and find more information.