Is this AB or BC? Is it just a semester class or do you have a chance to bring it up this semester? I think math can be a maturity thing - knew several kids who did poor when accelerated math in middle school and dropping back a level and giving it another year was all it took. Point is, work as hard as you can on being sure you are clear on the basics. Ask parents if you can get some tutoring with someone who will see where your problem is. No reason why you won’t be prepared for college math - many programs encourage kids with AP credit not to use it to skip over classes anyway if you have to continue taking math for your major area so look at this as a head start on college calculus.