Except that Marvel's characters were at the mercy of other movie studios choosing to do them. The relevant fact is not that DC has had 40 years - both Marvel and DC have had longer than that, theoretically. The relevant fact is that WB has had 40 years and Marvel Studios has had less than 10.
But it is also true that WB 40 years ago is hardly the same as WB today. One could argue that we should just compare the MCU to the DCEU, but that of course ignores some very recent and arguably relevant data points about the modern WB for no other reason than because Marvel started later. A fairer comparison would perhaps be Marvel Studios vs. WB since ~2000 when the superhero craze started. By that standard, you could argue a female character was their very first movie, except that they completely threw out the character and just stole the name for a totally unrelated movie. After that it still took them 10+ movies and almost fifteen years to get Wonder Woman made. Marvel, for comparison, will have made Captain Marvel (a far less well known character) at a little more than twice as many movies but still a few years less. Which basically boils down to both studios have a poor record and need to step it up. Which they both seem to be trying to do, theoretically, and DC is probably in a stronger position to do thanks to characters like Batgirl, Harley Quinn, Catwoman, Supergirl, etc; but I'll hand out accolades when they (either studio) start making good female led movies on a regular basis.