Not quite as invisibility since it has its own caveats, emphasis mine.
You are also adept at evading creatures that rely on darkvision. Such
creatures gain no benefit when attempting to detect you in dark and dim conditions. Additionally, when the DM determines if you can hide
from a creature, that creature gains no benefit from its darkvision.
UA: The ranger, revised P. 8
The main difference is that, invisibility does not end when you are detected by other means that are not magical or with special senses but, in the ranger case, the condition/ability ends as soon as the ranger is detected.
The invisibility condition in PHB 191.
An invisible creature is impossible to see without the aid of magic
or a special sense. For the purpose of hiding, the creature is heavily
obscured. The creature’s location can be detected by any noise it
makes or any tracks it leaves.
Attack rolls against the creature have disadvantage, and the creature’s attack rolls have advantage.
Now, about detection; attacking or casting a spell make you lose the benefit as stated in PHB. 195. Also, there is a big difference between dark and dim conditions (PHB. 183). The main difference is that with normal sight you can see the ranger in dim conditions but you are blinded in dark conditions. Therefore, the ranger in dim condition is not treated as if it has invisibility/heavily obscured, the ranger is treated as if in dim condition.
(PHB 195) If you are hidden—both unseen and unheard—when you make an attack, you
give away your location when the attack hits or misses.
(PHB 183) A given area might be lightly or heavily obscured. In a lightly
obscured area, such as dim light, patchy fog, or moderate foliage,
creatures have disadvantage on Wisdom (Perception) checks that rely on
sight.
A heavily obscured area—such as darkness, opaque fog, or dense
foliage—blocks vision entirely. A creature in a heavily obscured area
effectively suffers from the blinded condition.
Thus, against the ranger when trying to detect him in dark or dim light condition, a Dark Elf and a Human are not treated differently, as if they have the same visual capacities.
As an example, by courtesy of Keithcurtis; Robbie the Ranger and Frank the Fighter are trying to sneak past Danny the Drow and Harry the Human in a dimly lit cavern. Harry has disadvantage on the opposing perception on both the sneakers, while Danny only has disadvantage against Robbie the Ranger.
The DMG has a Workshop section for customizing your game, and one of the section is on "changing spell lists". It says (among other things) that:
Modifying a class's spell list usually has little effect on a character's power but can change the flavor of a class significantly.
So really, there should be no problems doing this from a power perspective and changing the flavor appears to be exactly what you're after.
You can find this section on page 287 of the DMG.
Best Answer
Yes, this ability should work on closed portals.
For reference, the Horizon Walker's ability as found in Xanathar's Guide to Everything is called Detect Portal. Its description states:
There is no ability called "Portal Lore" in XGtE, nor any other ability which detects portals, so it seems this "Detect Portal" is meant to replace it.
As for whether Detect Portal works on portals currently not open, I would refer you to the very section you mentioned in the DMG, page 45:
Though there is no explicit language about closed portals being as "detectable" as open ones, semantically we see that a portal is still considered to be a portal even when not currently open. RAW, then, if a ranger can detect a portal, they can detect a closed portal.