Effect of magnetic turbulence on the ion dynamics in the magnetotail