Nondetection won't stop the targeting
Nondetection, cast on an area, says (emphases mine):
For the duration, you hide a target that you touch from divination magic. The target can be a willing creature or a place or an object no larger than 10 feet in any dimension. The target can't be targeted by any divination magic or perceived through magical scrying sensors.
So Nondetection will protect the space in two ways. First, it will keep the space itself from being the target of a divination spell. Notably, the spell does not say that it protects creatures within the space from being targeted by divination spells (and compare this with, for example, Private Sanctum, which does).
Scrying, cast on a creature, says (emphases mine):
You can see and hear a particular creature you choose that is on the same plane of existence as you. The target must make a Wisdom saving throw...On a failed save, the spell creates an invisible sensor within 10 feet of the target. You can see and hear through the sensor as if you were there.
When the scrying is cast, it targets a creature, and not the area protected by the Nondetection, so Nondetection's first protection does not apply. Assuming the creature target fails its save, Scrying will create a magical sensor which can see the target itself 'as if you were there', and this will work regardless of whether the creature is in the area under the nondetection at the time.
Whether you can see the creature is open to interpretation
The second effect of nondetection keeps the space from being perceived through a magical scrying sensor. This will clearly keep you from observing the space itself by scrying. You will not be able to see the area under Nondetection.
But can you still see the creature itself while it is inside the protected area? This largely turns on whether or not the scried creature is part of the place. The rules don't give us a definition for "place", but the spell descriptions of clairvoyance, dimension door, and glyph of warding equate a "place" with a 'where', a location in a coordinate sense, rather than a more thematic 'scene' where the addition or subtraction of an object like a spoon makes it a different place.
One interpretation would then be that the targeted creature is not an inherent part of a place, at least from the perspective of the caster of scrying. The scrying would still allow you to see the target creature, even though the nondetection prevented you from seeing the place it was in. The creature is distinct from the place, and since the scrying spell says that you can see it, you can.
I imagine it would look like watching an actor in front of a green screen but before the CGI was overlain. You can see the person and their actions, hear them conversing and such, but the area around them is blank and you cannot see or hear what they are interacting with.
A different interpretation is that the entire location-bound area is under the effects of nondetection - it is a 'blind spot' for scrying sensors. When the targeted creature walks into the area it disappears from view, and reappears when it leaves. The creature may not be 'part' of the place in an essential sense, but while it is at the location it is still under the effects of the nondetection.
Unfortunately the rules do not clearly distinguish between these possibilities, so it is up to the DM to decide which interpretation they favor.