For a calendar course:


Create a copy of the course if necessary, and delete (or unpublish) the old version of the course.


For a regular course (students joined at different times):


Remove the students manually based on the payment date specified in the “Acquiring” settings (when using third-party payment methods, save information about the payment date). There are three options to deny the student access to the course: https://zenclass.freshdesk.com/en/support/solutions/articles/80000434951-options-to-deny-the-student-access.