Is a calorie a calorie which is a calorie?

The answer to the OP is yes. And the answer to the OP is no.

The intention of the “calorie” metric is that it takes the total amount of energy that your body would take from the food and sum it up into a single number. That takes a bit of math to accomplish, but theoretically at the end of the math the difference between bread, sugar, lard, etc. are all accounted for and you have achieved a value that allows you to accurately compare any two arbitrary items of food and tell how much energy there is in it.

The truth is that the math for creating the calorie is not perfect, but no one has yet suggested a better mechanism. In particular, it seems likely that the current methodology undervalues carbohydrates. But it’s also likely that it is nearly impossible for any methodology to ever be perfect (except maybe a tricorder) because different methods of preparation can change the answer. A good example would be blackberries. If you just eat them plain, the total number of calories is less than if you blend them into a smoothy, since a lot of the calories are in the seeds and the blender is able to break them open more thoroughly than we do by chewing. So in one form, most of the seeds pass through without being fully digested, in the other, the contents of the seeds are available to be digested. How is one supposed to label the calories of a bunch of blackberries, when you don’t know what the consumer is going to do with them? But basically, no, a calorie isn’t a calorie, since the math that tries to make it so doesn’t work properly.

On the other hand, if you keep eating the things that you like, but reduce the portion sizes to reduce their total calorie value, then you will certainly have reduced your average caloric intake. To a great extent, you could simply keep reducing the total volume of food that you eat per day or the total weight and, so long as you don’t do something silly like switching out your lettuce for condensed milk, but rather just keep eating the same things as you currently eat, again, you’ll reduce your caloric intake.

If you treat a calorie as being a calorie without changing the composition of your diet, then yes, a calorie is just a calorie.

At the end of the day, all health and nutrition - despite people having written thousands of pages of advice - can be reduced down to the simple advice, “Eat a well-balanced diet in moderate quantities. Adjust portion size/frequency as appropriate to gain or lose weight.”