I guess you missed the part "over any 20 year period". Since the Dow was first calculated in the 1800s, noone has ever held it for 20 years and lost money.
It's never happened. Same with the NASDAQ composite. Nobody has ever put their retirement or college money in a major index for 20 and not made just about as much as they'd expect.
The same can be said of any 10 year period, except the period 2000 - 2010 and if you pick specific dates at the great depression.
I suppose there COULD be a losing 20-year period, even though it's never happened before. Eating a banana could kill you by choking too. You wouldn't call eating a banana "gambling". Bananas HAVE killed people, "buy diversity and hold for 20 years" has never lost for anyone, making it safer than bananas.
Sure you CAN gamble with the stock market, just as you can gamble with a Coke bottle, but you need not. Buy broad and hold long term works every single time.
Kind of boring, yes, a boring way to get rich slow.