unthunk
It may seem that "rock star ninja developers" are a young person's game and to some extent it is. Many people find that their life priorities change as they age. Many younger developers may value making a name for themselves and devote a lot of time outside of 40 hours a week to coding and upping their game. So even if younger developers may have less on the job experience, they may be far more active in the development community than career developers. Those factors may be just as or even more important to some companies than tenure. Other companies may place more value in stability and tenure than having a bunch of rock stars. As you age and your life priorities shift (such as having kids with lots of extracurricular activities that you want to focus on), the type of position that suits you best may change.
To grossly oversimplify, startups will gravitate towards rock stars - cheaper and and flashier with a lot of drive, while enterprises will go for reliable, tenured developers who consistently get the job done even if they are just average. I've seen no shortage of middle ages .net and Java developers. Might not be the sexiest languages, but they are very popular with enterprises. Any company should be interested in a developer that is an accomplished learner and stable developer. But if your priorities in life don't include spending a significant amount of non-work hours diving into the hot language/technology du jour, you won't be able to compete with younger developers who can.
So yes, there is a job market for average middle-aged developers, it's the same job market for all developers. But if you're suited to an enterprise position you'll have a hard time finding one that lives on the bleeding edge of technology of which you might be wanting to get into.