Yes. As long as you pass the course — and D is a passing grade — it will count toward the biology major and toward the 120 credits you need to graduate. Other majors may have different requirements, and if you decide to switch you should check the current catalog. Regardless of your major, you will need an overall grade-point-average of 2.0 in order to graduate.
← I received a D in course taken for the biology major — will it count?