Have you tried below?
Choose Apple menu > Log Out, and then log in again. Try to eject the disc again.
If you still can’t eject the CD or DVD, choose Apple menu > Restart. While your computer restarts, hold down the mouse button or trackpad button until the disc is ejected.
RM