I’d probably retake the class, especially if you can get the D grade replaced and you can take the AP class senior year. As I mentioned on another post, I’d talk to your guidance counselor (or even principal) and see if the school can do something like switch the class to P/F given the serious health issue you faced during the year.
Be sure you complete a sequence of bio, chem and physics in HS.