Amount of muscle is not genetic. It is lifestyle related. Do you walk a lot? Or did you used to? To lose fat and muscle, the only way is to eat less calories than you burn. The only way to target one area for muscle loss is to use those muscles less than your other muscles while you are losing weight. There is no way to target one area for fat loss. (Your fat distribution pattern IS genetic.)
A good exercise to get thinner legs is jogging. For one thing, sustained cardio burns lots of calories. For another, jogging is different from walking or sprinting because it uses fewer muscles. The motion relies more on momentum to pull you forward, vs a sprint where you use muscle to pull your legs forward as fast as you can, or a walk where you use muscle to create a controlled motion for a longer duration during each stride. This is why joggers and marathon athletes are known for having spindly and sometimes even emaciated-looking lower bodies.
I would also suggest trying a plant-based diet. Like: beans and rice, potatoes, lots of fruit and veg. This diet changed my body composition to be more lean, even though I didn't change anything else.