I can definitely relate. I felt much the same way during my time in uniform.In high school I began to realize that there was something different about my personality. I now know that it was the fact that I was a young "INxx" wondering why I didn't fit in with the "ESxx" masses. I just didn't get them and they didn't get me. But, my military experience REALLY made that stand out. 2 years into the military, I thought that I had serious problems. I felt so much out of my element and so frustrated with the life I was living, that I just felt like I had some serious issues and that I may never figure out what they were.
Just imagine going to "ESTJ Disneyland" every single day for 4 years. At ESTJ Disneyland, you can't question the rules, you have to shut up and do it - and as others have mentioned, there are times when what you're doing makes zero sense.
It was a great experience that I also would not trade in. But, truth be told, it was at times - excruciating. Imagine asking an ESTJ/ESTP to sit at home and research the life work of people like Plato and Aristotle, and to write long, well thought out, grammatically correct essays about their lives. And to join a think tank and spend countless hours engaging in abstract thinking without any real, tangible production. These kinds of activities ALLLLL day. Every day. For 4 years. With 150 INTP's looking over your shoulder and saying, "You're not doing it right! You're not thinking creatively enough. You're just writing very basic, straightforward stuff."
OK, I'm exaggerating but the point remains. At times, it REALLY sucked. Somehow, I'm still glad I did it. And I did well. I just had to conform and really be someone I didn't want to be. It was not a natural fit at all.