The war genre has always been an extraordinarily male-dominated field, perhaps moreso than any other genre. I've previously written on how old science fiction movies used to think female astronauts would never exist, but female characters were still prevalent in that genre even if they weren't usually the central focus. Another great contender would be the western, but even there we usually have at the very least a woman in a supporting role, and once in a while even a female protagonist.
Of course, with the war genre, the reason why we see so few women is a little bit different than for other male-dominated genres. The reason why so many old science fiction stories never considered the possibility of female astronauts probably has to do with the way gender roles were viewed at the time. The genre has changed with society. In fact nowadays, barring exceptions like Moon you'd be hard-pressed to find any space-themed science fiction story that doesn't show female astronauts at some point. The war genre is a bit different, especially when looking specifically at war films focusing on actual combat.
There are a variety of possible settings for war films but based on experience, the two most common backgrounds would be World War II and the Vietnam War. Both these conflicts were happening at a time when the army was very exclusive towards men, so it is understandable that, even with changes to society, films set in these wars don't have more female characters.
Now granted, there are some exceptions. We Were Soldiers provides some focus on the wives of some of the soldiers, even if the emphasis is on the battle itself. Passchendaele had at its core the relationship between a soldier and a nurse. The Redux version of Apocalypse Now did feature a few extended scenes with female characters, even if their role in the plot itself was fairly small. Still, you rarely find women as anything more than extras.
Now let's shift focus a bit more to films set in the present day. Obviously, it would seem a little out of place to start showing female soldiers in the midst of World War II (at least disregarding any film from the point of view of Russia) or the war in Vietnam, but how often do we see female soldiers depicted even at a time when they're more common?
This is kind of a weird case because female soldiers do show up in other genres. Even James Cameron got in on the act back in the 80's when the cast of Aliens included three female marines. In the war genre, however, they don't seem to appear much even when it makes sense. Black Hawk Down, Jarhead, and The Hurt Locker are all films dealing with contemporary wars that never have any indication of female soldiers being present.
I suppose I could bring up In the Line of Duty, which does have a female combat medic as one of its central characters, plus three female soldiers and plenty of other instances where women are shown to be every bit as equal as the men. Unfortunately, In the Line of Duty only exists in the form of a screenplay right now, and it probably will until such a time as I manage to somehow get in touch with someone willing to finance it, unless of course you include the high school version.
Anyway, there does seem to be a strange trend more recently regarding female protagonists. It seems that a lot of the sorts of movies to feature female soldiers are ones that take place off the battlefield. Movies like the British independent film In Our Name along with the upcoming Fort Bliss both feature female protagonists with army experience, but in either case it's about their struggle with the mental effects of war after returning home, rather than their involvement with any actual combat.
It is curious that we see so few women in war films. Even today, as women are being integrated into the army, we see very few films which actually depict women in combat roles. In most cases, the female characters seem to be either in a non-combat role, they're not stationed in a combat position, or the story focuses on their return home... and that's assuming they're even there at all.