If so, how can I do it? If I can’t, what should I do? Because They stopped offering the class, so I cant retake the class.
You can only withdraw from a class during the semester you take the class, usually before a stated deadline. You will have to live with an F on your transcript.