Old Traditional IRA with non-deductible funds converted to Roth IRA

So in 2021 I contributed $6000 of non-deductible money to a Traditional IRA and did so again in the beginning of 2023 (don't ask why I didn't do a backdoor Roth at each time, just call it not being well educated to the process). I then had a total of $12000 which has since gone up to $12400 in gains. Can I convert that money to a Roth IRA? I've already did a backdoor Roth in 2024 of $7000. Since the IRS see's the IRA as one bucket, is the $400 taxable and how would I figure that out next year? That's why I figured I convert everything and start fresh in 2025 to do a clean backdoor conversion moving forward. How will that look on my 8606 form when I do taxes for 2024 if I can? Would the basis become zero since all the funds from the Traditional IRA has been converted to a Roth?