@Naomi Marie
Welcome to BP. I am active duty Army, with plans to stay until retirement, however my plans may be able to give you some ideas.
-Purchase where you think you can rent it out the best if that is your plan, however if you want a better quality of life buy where you want to live and deal with the rental part later.
-Buy within your price range for payment as you don't want to be house-poor while living there. Military BAH is great because it is tax-free.
-Research rental rents in the areas you want to purchase, ensure the rental amount covers your costs( mortgage, repairs, HOA, PM fees).
Questions for you:
Are you using a VA loan?
How much down payment will you use?
What is your savings plan now for when you turn the home into a rental or cover unexpected costs?
I have heard the DC market is rocketing and the MD market is following but not quite as strong. Depending on what you truly want, a home or a future investment you will have to decide where to buy.
Good luck and welcome again!