Super Mario 64: 1996
Super Mario Sunshine: 2002 (6 years)
Super Mario Galaxy: 2007 (5 years)
Super Mario Galaxy 2: 2010 (3 years)
Now: 2015 (5 years)
It actually hasn't been that long since the last 3D Mario game, though if we don't get anything at E3 in June we're probably not going to get one for a very long time.
I don't count 3D Land and 3D World because they're basically New Super Mario Bros. X with a Z axis and little to no common elements between levels in a world. 3D Land was all right, but it was absolutely blown out of the water by Galaxy.
Also as someone who sort of makes games . . . . . . . . . . . . . . . . .
Spoiler!