Can I offset gains from sale of retirement assets whose proceeds were used towards purchase of a new home?
No. If you sold assets and have a capital gain, that is taxed according to the rules that apply to capital gains. It doesn't matter what you do with the money.