By the rules, no, I do not believe you were wrong. But that's cold comfort to players whose game experience is negatively impacted by the DM's ruling.
My take on this, lacking any additional context, is that the player's objection has less to do with how detect magic works and more with the perception of this situation being a "gotcha." A gargoyle can be a "gotcha" type creature if the DM hasn't sufficiently telegraphed their presence in the build-up to the scene in which they are encountered. The players get the feeling of having been blindsided as a result, having not been offered an opportunity to make meaningful decisions to avoid their fate.
Telegraphing is just a fancy term for the DM establishing clues either before the scene in question or during it. So if you had said previously in the adventure that "the wizard's tower is known to be guarded by demons of rock and stone..." then when the players encounter the statues, they might think the statues are more than they seem. Alternatively (or in addition to this), you could describe how there are four statues in the chamber, but one of the statues appears to have been removed from its pedestal and stands in the center of the room in a different posture than the others. Or the statues have dark brown stains on their mouths and claws. Something that indicates to the players that it might be worth exploring. Even if they don't figure it out and are jumped by the gargoyles, then at least they can reflect back on the fact that they did get a clue, but failed to put two and two together. This reduces the chances that the players perceive the DM as hitting them with "gotchas."
Something else to consider: What if you had said that detect magic revealed an aura around the gargoyles? Would this have materially changed the outcome of the encounter? Would not the gargoyles still have attacked, only without a surprise round perhaps? You might have gotten more or less the same result but without a player objection. Is it also possible that this warlock has Eldritch Sight and spams detect magic like crazy and you're getting a little tired of it?