I present two different, independent arguments, hopefully at least one is helpful. (And a bonus tongue in cheek argument.)
Nondetection says it hides the target from divination magic.
Flavorful language in spell descriptions are rules too. Indeed, the entire spell description is the spell's effect. From the rules for reading spell entries:
The rest of a spell entry describes the spell's effect.
The description of nondetection says:
you hide a target that you touch from divination magic.
Detect magic is a divination spell, and nondetection says it hides you from it. Case closed.
Victims of AoE spells are referred to as targets.
This isn't easy to find, but there is a rule in the PHB which specifically uses "target" to refer to someone affected by an AoE spell, in the section "Targeting Yourself" (emphasis mine):
If you are in the area of effect of a spell you cast, you can target yourself.
Additionally, we see in the rules for Saving Throws (emphasis mine):
Many spells specify that a target can make a saving throw to avoid some or all of a spell's effects. The spell specifies the ability that the target uses for the save and what happens on a success or failure.
AoE spells are obviously in view here. Further, in the DMG's rules for Adjudicating Areas of Effect, we see (p. 249-250; emphasis mine):
If you would like more guidance, consider using the Targets in Areas of Effect table. To use the table, imagine which combatants are near one another, and let the table guide you in determining the number of those combatants that are caught in an area of effect. Add or subtract targets based on how bunched up the potential targets are. Consider rolling 1d3 to determine the amount to add or subtract.
[There is a table here]
For example, if a wizard directs burning hands (a 15-foot cone) at a nearby group of orcs, you could use the table and say that two orcs are targeted (15 ÷ 10 = 1.5, rounded up to 2). Similarly, a sorcerer could launch a lightning bolt (100-foot line) at some ogres and hobgoblins, and you could use the table to say four of the monsters are targeted (100 ÷ 30 = 3.33, rounded up to 4).
In the rules for using miniatures on a combat grid, we see the following about areas of effect (p. 251; emphasis mine):
The area of effect of a spell, monster ability, or other feature must be translated onto squares or hexes to determine which potential targets are in the area and which aren’t.
For a more specific example, the spell description of fireball even calls creatures it affects "targets":
A target takes 8d6 fire damage on a failed save, or half as much damage on a successful one.
Therefore, a creature under nondetection cannot be a target of detect magic, in the sense that the rules refer to victims of AoE spells as targets.
Mostly joke argument, but kinda for real.
Its called nondetection, obviously it defeats detect magic.