In almost every case, men who have never had a wet dream have masturbated regularly since puberty or before. Masturbation provides the needed release of semen and sperm, and provides the brain with needed erotic stimuli. Masturbation and sex take away the physical and mental need for wet dreams.
However, wet dreams can occur in guys who do regularly masturbate. It seems some men are more predisposed to getting wet dreams than others. Guys who are predisposed to getting wet dreams, often get several per month while they masturbate regularly as well. If they slow their masturbation frequency, their wet dream frequency typically increases in response.
So some guys may be able to get a wet dream if they reduce their masturbation and/or sex frequency, but not quit completely. For example some guys may be able to get a wet dream by reducing their masturbation frequency from once a day to once every two weeks. But if you really want a wet dream, the best chance to get one is to quit masturbation completely. Each time you masturbate, you reduce your chance of a wet dream.
There are a rare few individuals who never masturbate or ejaculate through sex, and never get wet dreams. Its not clear why this is the case for these individuals. But the vast majority of individuals who practice such abstinence experience frequent wet dreams.