You're right, but I don't think it's wrong to go to a priest or religious leader to ask for their prayers for recovery from gambling addiction. It's wrong to ask for guidance or a way to recover from gambling addiction, but I think they're still the right people to come to for prayers and motivation to seriously repent from bad habits. They are people who can guide you toward goodness. Whatever the case, they can be the most appropriate reference, although for gambling addicts, it's less specific to ask a religious leader to treat them.
Well there is nothing wrong with prayers but even the bible said that faith without work is dead or non effective, some people go for prayers blaming their addiction on being spiritual and they put in no effort to make sure that they quite gambling. Going to meet a pastor is not bad but if you are going to stop gambling then you must be disciplined.
If you really want to change yourself, it is important to change not only prayers but also practical steps, because to break a bad habit like gambling, you have to change your decisions and learn to control yourself regularly. However, the main problem in this case arises when people think that they can get rid of a destructive habit like gambling in their life by just praying, or they limit themselves to just thinking without taking any practical steps or setting any limits. Gambling, which should be entered into in such a way that you do not face any obstacles to get out, and can be limited to just having fun, should be taken as lightly as possible.