retaking ap class

i got a D in my ap class first semester, i am doing well now, but i want to retake first semester. should retake it on apex or a community college?