I'd guess it could be a few different things. The simplest one may be something like your seeing military people in TV/news, empathizing with them (especially since you were there), and being reminded a little more acutely of how you felt when you there. OR, maybe it's equally simple (but different): Maybe there was some feeling you had at that time in your life (related or not related to the military, positive or negative), and there's something in your life now that either makes you feel the same (again, positive or negative) or else that you don't have now, aren't happy about not having, and get back for yourself in your dreams by returning to when you had that feeling (that you may not have even thought about at the time, and only think about now that you know it's missing).
OR, more complicated than either of those possibilities: As abluefornina said, you have some unresolved issue directly related to something that went on at the time, that you didn't allow yourself to think about as much as you needed (or else that you no longer talk about even if you still really need to); and that's coming out in your dreams.
What may possibly help you figure it out is to think of whether there's some "main feeling" ("feeling theme") your dreams about being there have in common and how does the feeling/main thought related to your post-military life since you've been having the dreams. But also, go with the simple thing, too, about asking yourself if, when you're reminded of military people, there's some common thing you tend to think of/be reminded of. And it could be something simple like missing someone, hating (or liking) how you felt wearing a uniform, being confident, being not-confident - just something you're reminded of feeling (even if only for a few seconds when you see that reminder).
I frequently dream about when I was working at the place where I worked for six years (before I had children and when I was mid- to late- twenties (or so). The dreams are harmless seeming, but I've realized they're more about how I felt at the time in my life versus how I've felt since (or now), rather than about anything that actually went on when I working there. Sometimes it's about good feelings I had then and don't now. Other times it's about good feelings I have now and didn't then. Or, it's often about just me within the context of life or a larger circle of people. That setting is my own mind's frame of reference for "different from since then".