How can I get weight loss without losing muscle?

Eat well, exercise. You need adequate protein (about 70 g/day) of good quality. Plus you need some carbs. Also adequate vitamins, minerals, fluid, fiber. And of course you need to exercise, especially some weight lifting exercise. All this will minimize loss of lean mass, however with significant weight loss, you will lose some lean body mass. It is inevitable because the excess fat makes you "overmuscled".