Pretty sure protein just makes you gain weight.
Well you're not very well informed then. If your energy intake and expenditure are equal, you won't gain or lose weight. So in that sense all calories are equal. But they're not actually. If you eat a higher-protein diet that's balanced then your body will reduce body
fat and increase body
muscle, because muscles are made of protein and bodyfat is most efficiently converted from fats or sugars in your diet. Your body is evolved to store all the stuff you give it, but that doesn't mean all "stuff" is stored the same way, because it's not efficient to be converting stuff back and forth, and different body tissues are made of different stuff.
That's the simple answer, but there's more to it, involving insulin, which explains why sugars make you "fatter" than fats do. Insulin is actually a communication system. High insulin means "we have tons of sugars here". It causes the muscles to
selectively consume sugars and reject fats. All fat gets stored in fat cells at this time, and excess sugars that aren't consumed are gradually converted to fats as well (which is a costly synthesis action, which is why it's burnt by preference). Low insulin works to reverse the process. Muscles start accepting fats as fuel, and fat cells start releasing fats into the bloodstream. Basically the body tries to avoid synthesizing anything if the raw material is already there. This extends to muscles/protein. If there's excess protein, it's eaten by muscles by preference, because converting it to fat would expend energy. The reverse happens if you have a "balanced" diet that is too low in protein: the fats and sugars are most efficiently used to grow the fat cells, so they grow, and your muscles gradually waste away because they don't get enough protein to repair inevitable day to day damage.