A. If the course belongs to a group you can use the group functionality for this.. If not, you can create a new group, add the course to this new group and then add the users that you want to be affected from this action. Next, go to the mass action button and select to unenroll users from group courses (1). This action will unenroll all group users from all group courses.
B. Please note that you need to have a Plus plan and above for this solution.
Go to your Reports and then Custom Reports and select 'create a new report'. You can select users according to specific rules, for example the users that have the user type "learner" (1). Add their report (2) to see the users list.
Then move to the Mass action button (3) and select to unenroll users from the course (4).
You will see a list of all the courses from which you will need to select the course that needs to be removed from your users (5). Finalize your action by clicking on the unenroll button (6). The users of this list will no longer be assigned to the course.