The N64's market lifespan was from 1996 to 2002.
The Gamecube's market lifespan was from 2001 / 2002 (varies by region) to 2007.
The Wii's market lifespan was from 2006 to 2012 (although Ubisoft has released Just Dance 2019 in Oct., 2018). WiiConnect24 (& Nintendo WiFi Connection) services were discontinued on May 20, 2014 (which RiiConnect24 & WiiMMFi have become a 3rd party replacement). The Wii Shop was officially discontinued as of Jan. 30, 2019.
The Wii U's market lifespan was cut a bit short, from 2012 to 2016 for hardware with most software ending March, 2017 (with Zelda: Breath of the Wild... although Ubisoft did release Just Dance 2019 in October, 2018 for it).
Please be aware that even when a console becomes "market dead", there can be some time before they're removed from the primary markets, especially when the successor has backwards compatibility. Since the Gamecube isn't backwards compatible with the N64 on a physical level, it's very likely that the games were removed from the primary markets around 2004.
Hope this sheds light on the subject.