See Query cancellation here - https://druid.apache.org/docs/latest/querying/querying.html
Queries can be cancelled explicitly using their unique identifier. If the query identifier is set at the time of query, or is otherwise known, the following endpoint can be used on the Broker or Router to cancel the query.
For example, if the query ID is abc123, the query can be cancelled as follows:
curl -X DELETE "http://host:port/druid/v2/abc123"