Pokemon's 2018 legendary distribution events are ending this month with Lugia and Ho-Oh: to grab them you'll need to head to GameStop from now until November 25. As a note Lugia is linked to Sun (both Sun and Ultra Sun) and Ho-Oh is linked to Moon (both Moon and Ultra Moon).
The whole "legendary year" thing started in 2016 and was brought back for 2018. The gist is that every month from February through November (or December) players can net either a single legendary or a pair of them with various events, some of which are incredibly convenient and can be done from the comfort of your home: and some that involve heading into a GameStop or Best Buy.
Nintendo and Game Freak doubled up on this event by including a heap of classic legendaries in Pokemon Ultra Sun and Ultra Moon when it launched in November 2017. Basically, you've gotten tons of chances to pick up most of the legendaries in Pokemon's 20 plus year history if you own some combination of the Sun and Moon generation entries.
It's not known if Nintendo is going to repeat the legendary giveaway for a third time (they announced 2018's event in January of this year so look out in a few months), but with Pokemon Let's Go on the horizon we can probably bet on something for that pair of new Switch games.