This is very true, even if a person changes his environment a thousand times, he will not be able to change if there is really no great intention that arises from within his heart. Intention to change is what is needed for an addict to be able to leave the things that make him/her addicted, and great support from family plays a more important role for a person to recover from his addiction than changing the environment.
But do keep in mind that change of hearts often happens due to their environment too. Something urges people to change, perhaps it's something that they can see around them or something that they are currently doing which is very new to their routine. A change in environment plays a huge role in curbing gambling addiction. Try to distance an addict from his/her fix. There will be some symptoms of withdrawal but with constant monitoring and diversion of their interest, they'll slowly change their ways and not notice that they're no longer addicted to something.
Changing environment is indeed a factor in developing a change to a person. A person who doesn't have the intention to change will not instantly stop what the person want's to do but changing some things like changing it's environment can help the person realize what things should he change to fit in that certain environment. If I myself were put in a village were there were gambling is prohibited, I will respect it and abide the place. I'm sure an addict will do everything just to do he wants but sooner or after there will be a change in his perspective. Changing the environment can possibly make some addict stop playing gambling and some addicts don't. It depends on how addicted and how the addict realize things.