I am a follower of your blog, an avid science fiction and fantasy reader, and a hoping-to-be-published-one-
Now, this is a tough one. There are a lot of different ways to approach this.
Here are my thoughts.
On one hand, you never want to "write for the market." As a reader, the books that are coming out were typically sold between a year and two years earlier. Which means you're always going to be behind the curve and therefore at a disadvantage. (Unless of course you are a psychic and can predict what's next--in which case, I'd love if you could give me a call...) But seriously, if you look at the books that have become successful, they're books that came out at a time when they were the only thing out there.
I was teaching when Twilight first came out and I saw my students roll their eyes at the idea of a girl who falls in love with a vampire. That was so not cool...until other people read it and raved about it, and then they read the series as well as several other vampire series as well.
I also firmly believe you should write what you love and what you're passionate about. This industry is tough and if you don't love the writing, the business and the publicity and the ups and downs will absolutely drain you.
That said, there's a point where the art of writing and the business of publishing have to meet. And in the business Dead Genres do exist. (I think dystopian is already pretty dead). There are queries and manuscripts that I reject solely on the basis that it's paranormal or it's dystopian--because they're not selling.
So if you're writing a YA dystopian novel, where does that leave you?
I don't want to tell you to give up. If you love the novel you're writing, write it, finish it, gain the experience from the process. Even query it--write the query, revise it, send it out, make connections with agents. And then while you're querying, write something else--something different, something that will challenge you and make you better at your craft.
Do this because even if the manuscript doesn't get you an agent and/or doesn't get published, you will learn and you will become that much closer to the agent and/or the sale. And that will help you when your next manuscript is finished. Do this also because who knows, you might get lucky.
Here's why, just a few weeks ago, I requested a YA paranormal from my queries. It was literary in style and totally weird and different in comparison to what I'd seen out there. In the end I didn't offer representation, but I sent some notes on the ms (and also told the author that actually instead of doing those notes she might want to just set the ms aside and work on something else) and I said I was really interested in seeing her next project. (Agents don't lie when we say that and we don't say it to everyone.)
I have also taken on a few projects that I knew in my heart weren't "commercial." They weren't going to be an easy sell--in fact, I might not sell them at all. But I loved the manuscript and the writing, and I had faith in the author, that even if this first manuscript didn't sell, one of his/her next manuscripts would and that investment was worth it.
Another thing to keep in mind--dead genres don't say dead forever. If you can't sell that YA dystopian right now, that doesn't mean you won't be able to sell it down the road. I've told clients this. There is no shame in putting a manuscript aside, telling yourself "it isn't the right time for this one," and then planning to come back to it in a few years with a fresh perspective.
And I'd say this is good advice for everyone, no matter what you're writing--put everything you have into the manuscript you're working on. Query it, and then write something else. And keep doing that until you find an agent, until you sell your first book, and then beyond.
Be patient, it doesn't happen overnight for anyone.