Unfortunately sometimes macOS or an app will not stop their job when ejecting a drive.....or it may just take a long time for them to close out their current job. Spotlight is a very common cause for an external drive not ejecting quickly. You can find out which apps or processes are accessing that drive by using the following command in the Terminal app:
sudo lsof /<path-to-volume>
Where you need to replace "<path-to-volume>" with the correct full path of the volume which is not ejecting. The easiest way to get the proper full path (especially if there are any spaces in the path) is by typing the first part of the command into the Terminal making sure to leave at least one space after the "lsof " part:
sudo lsof
Then using the Finder, drag & drop the volume to check onto the open Terminal window.
You will be prompted for you admin password. Nothing will appear on the screen as you type the password, so press the "Return" key to submit the password.
For example: If your external drive volume is called "My Disk" which by default should be mounted by macOS at "/Volumes", then the command would look something like:
sudo lsof /Volumes/My\ Disk
FYI, you should never force eject any drive/volume or you will corrupt the file system and data....especially if data has been written to that drive. In fact, whenever I eject an external drive, I will wait a full minute before attempting to physically disconnect the external drive to make sure it is safe to do so. Even if the external drive has an activity LED, I will still wait another 30 seconds after the LED stops flashing before physically disconnecting the drive.
While very inconvenient, I will power off my Mac so I know that the data in the drive buffers were sent to the external drive, then I will disconnect the drive while the Mac is powered off. If this keeps occurring, then I try to look for what may be causing the problem. Sometimes the "lsof" command doesn't reveal anything which makes troubleshooting very hard.