I’m particularly going off my hazy memory here but there were two things - invading nepal was not worth the cost since nepal doesn’t have much of natural resources and the terrain is tough. The Indo-Gangetic plains south of it were much richer and easier to control. Second, the British for some reason were very terrified of Gurkhas.