College physical education is an exploratory course. Generally, grades are calculated by semester, not by individual sports.
Therefore, your single failure will not affect the total score of the subject in principle.
Therefore, you can still get a diploma.
But there are two problems you should pay attention to.
1. Yes, if it is because of physical problems, you must have a hospital certificate, and your department should go through the exemption procedures.
2. If you fail in a single event, you'd better communicate with the PE teacher early, so as not to affect the total grade of the semester.