2008 Nissan Xterra - Cuts Off

Good morning my Nissan x trail cuts out in driving soon as i come down to 1st gear i replaced new battery thinking that was the problem but still it does that. What can be the cause of this?