F on transcript - will it hurt my chances?

Hey all! New to the forum here.

My situation: I’m a freshman at college and I’m very certain that I’m going to fail a summer class I’ve taken. It’s not that I didn’t work hard, it’s just recently I’ve been suffering from insomnia. I’m currently enrolled in QC, this class is a class that pertains to my major, and I’m sure I can retake it in the Spring and get an A. The problem is that I know it’ll stay on my transcript after I rectify it. I’m usually a straight A student, and plan to continue the trend into college, the problem here is that I’d really like to transfer to an Ivy League school at the end of this year when I finish my associates degree. Will this hurt my chances?

I’m sorry if I’ve broken any rules, again, new to the forum.
Thanks all!