Military gains ground on ISIS