RAW: You do not know whether it is consecrated or desecrated
For the duration, you know if there is an aberration, celestial, elemental, fey, fiend, or undead within 30 feet of you, as well as where the creature is located.
Similarly, you know if there is a place or object within 30 feet of you that has been magically consecrated or desecrated.
As written, the spell does not allow for determining the difference between consecrated and desecrated only detecting the presence and location of either. All it says is: if [there is a consecrated or desecrated place within 30 feet] then [you are able to locate it].
In 5e, spells do only what they say they do and the spell does not allow any way to differentiate the two types of places, it detects both. It doesn't even say that you get to choose one to look for when you cast it. If the spell allowed you to tell the difference between the two it would say so.
The same thing applies to the first part of the spell as well.
You can't tell what precise creature type something is, only that it falls into that list and are able to locate it.
Other features have wording (which this spell does not) that specifically allows for this
Compare this to Divine Sense (the paladin ability) which specifically allows you to know the type of creatures:
Until the end of your next turn, you know the location of any celestial, fiend, or undead within 60 feet of you that is not behind total cover. You know the type (celestial, fiend, or undead) of any being whose presence you sense, but not its identity (the vampire Count Strahd von Zarovich, for instance).
The first part of this ability is almost identical to the wording of detect good and evil, yet the ability still needs that second sentence to allow it to specifically identify the type.
See also detect poison and disease which also has the language allowing the poisons to be identified.
For the duration, you can sense the presence and location of poisons, poisonous creatures, and diseases within 30 feet of you. You also identify the kind of poison, poisonous creature, or disease in each case.
If detect good and evil was intended to work this way, it would have included a similar specification.
The spell is named poorly, but that doesn't change how it works
Some spells' names are confusing or downright deceptive1, but that doesn't change what the spells' descriptions say they do. In this case for example, detect good and evil doesn't detect alignment at all, but it senses creature types often associated with some alignments as well as objects and places that have been touched by divine power. Other than that it does do what it says: detect. The spell detects all of these things and allows them to be located. Nothing in the spell indicates or even implies that you can differentiate between the things that are found.
Rules as Fun: Harmless to allow as a houserule
Besides potentially stepping on the toes of the paladin feature Divine Sense, there really is nothing that would break by allowing the caster to know the type of creature or if ground was consecrated or desecrated. It would be a small boost in utility, but certainly nothing to be super concerned about. We play it this way at my table and have had no issues.
If your campaign plot is full of fiends pretending to be celestials (for example) or your plot is fragile to such abilities obviously you should see caution in adopting it.
Just note that this would be a houserule so not really allowable at Adventurers League tables or other tables that strictly adhere to RAW.
1 - A few examples: Catnap, does not put creatures to sleep. Sacred flame does not do fire damage. Chill touch does not do cold damage and is also not a touch spell. Daylight does not actually create sunlight.