I'm going to bet you have the wrong debugger configured.
Go through the debug settings and look for an ST-LINK setting.
That's the one you need.
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question. It helps the next guy.