I never tell someone to not try writing in a particular style, but rather I tell them to try everything. Try horror, romance, thrillers, philosophical narrative, and anything else they want to commit to words. This might show the aspiring writer a thing or two about genres, but it will get the person writing enough to find their own voice, and voice informs style.
My father was an artist; his style best described as neo-classical romanticism. When he was a student, he would study Renaissance Era masters and try to be the next Raphael (The Italian artist, not the Ninja Turtle). He would also hound his teachers to offer critiques that could make him more like those great painters. And they refused to grant his wish.
Finally, one of his professors must've just had enough, because he offered a very simple critique. According to my father, the professor said, "You want me to compare your work to Michelangelo? Da Vinci? Then you're horrible. You will never be one of them, nor should you. You don't have the talent to be a Raphael. You do have the talent to be an excellent Pressler, which Raphael never could be. So be that."
What my father took away from that is his real talent and his natural skills were far better suited for something other than becoming another Renaissance painter. However, by studying the great artists, he developed a set of tools that allowed him to work on his personal style once he found it. That personal style served him well for the rest of his career.
When we write, we are strengthening our toolkit. When we stretch out our comfort zone and decide to try writing poetry, free-verse, or whatever, we are adding new tools to our kit. When we combine these two talents, we learn not only how to do things in a different way, but also what we like, what moves us, and what affects other readers.
If your goal is to write a particular way, then by all means try everything you can to develop that specific set of skills. However, never be afraid to go outside that range and find new ways to express yourself. Whether it works or not is not the point. It is a chance to find something new and become a better you, so that when you really latch on to something that works, you have a full set of tools to build something excellent.