Retirement tax questions

"I should rightfully owe tax on everything in the distribution that was not a non-deductible contribution (i.e. market gain). "

"6K of non-deductible contributions for the 2021 tax year to a roth IRA. "

 

That doesn't count and that's why your calculation is different from Form 8606.