I'm not entirely familiar with this, but I thought not re-investing dividends just made them end up in a cash position within the 401k (so a money market fund usually). I didn't think they came out of the 401k. And whether that is even an option probably depends on the 401k plan you are in.
As to getting money out of a traditional 401k you really can't take a distribution directly from the 401k without getting hit with a 10% penalty (except for some very specific circumstances). Also, distributions are always taxed as income, not capital gains, even if the earnings are actually capital gains.
If you want to extract 401k funds early without penalty you typically must roll over to an IRA first. With a traditional IRA you can do SEPP (also known as 72t). With Roth IRA you can withdraw five years after the roll over - you pay the tax when you roll over from traditional 401k into Roth IRA and can then later withdraw from the Roth IRA tax and penalty free. This scheme is called the Roth Pipeline. Both are discussed here fairly frequently and you'll want to understand them in detail before implementing either.