What is the recovery level of the database? Have you backed up the database log?
If you don’t have the need for point in time recovery, change the recovery level to SIMPLE. After a few minutes SQL Server will clear out the log, and you will then be able to shrink the log file.
If you do need point in time restore capability then you will need to backup the log using the BACKUP LOG command which will then clear the log allowing you to shrink the log file.