It is a gemara in Rosh Hashana 16b . The Gemara says four things tear up a verdict against a person: Charity,crying out to Hashem, changing ones name,changing ones deeds and v’yeish omriem even changing ones place.
My impression is that the Gemara is not simply talking about moving. It is talking about Teshuva. Change from bad places to good places that bring merit.
Well i heard a story (i dont personally know the people but i know their relatives who told me the story) where a couple didnt have kids for 10 years and they were told by some rabbanim – meshane makom, meshane mazal, so they moved house, changed jobs, started over anew with all things that they could – and had a child not long after….
That Gemara is not talking about Mazal, it is talking about a Gezeira. However, the Gemara in Bava Metzia says that someone who cries for help but didn’t bother moving should be ignored.