Question: Is there anything wrong with setting my detective novel in the recent past (1990s)? I have been advised that publishers aren't keen on this.Answer:
Wrong? Of course not. Books set in all variety of eras are regularly published.
But what you're concerned with here is the type of book currently in high demand by publishers and popular with readers.
The trouble is, you cannot anticipate this. Whatever type of mystery novel is currently enjoying popularity, you can be sure publishers have already bought all the books of that type they are going to publish for the next two years (it takes that long to get a book into print). By the time you write your book (which can take months if not years), get a publishing contract (which can take months if you're lucky), and actually see your book on the bookstore shelf, the trends will have changed. What is popular now may be far less popular by then.
On top of that, if a type of book is popular now, that means publishers are already looking for what they believe will be the next big thing. Most of them will be wrong in their guesses, but they have a better chance of being right than most people because their finger is on the pulse of the market.
As a writer, you have two options. You can try to guess what the next big thing will be after the current trend has peaked. If you are an avid fan of your genre and understand the zeitgeist, you may be right and will have exactly what publishers want in a year or so.
Or, you can just write the book you want to write and take your chances. Frankly, I expect that if you write the type of book you would love to read, chances are a lot of other people would love to read it too. Your odds of hitting the next big thing may be just as great as if you try to anticipate the market.
Besides, it's more fun writing a book you love than trying to write something you think will be marketable but have no enthusiasm for.
That said, you might do some research and find out what it is about the 1990s as a setting that some people find dull, then look for a different way to write about it. My guess is that it is a nostalgic time for some readers that is becoming a historical period for others. Perhaps look for a new way to present it. If it is nostalgia for you personally, maybe take a more objective look at the issues and forces that were at play.
Best of luck.