This service was deprecated in Drupal 8 and removed in Drupal 9.
Path aliases were converted to an entity. You can use the entity storage and additionally the path_alias.repository service for some common case-insensitive lookups:
$path_alias_repository = \Drupal::service('path_alias.repository');
if ($path_alias_repository->lookupByAlias($alias, 'en')) {
return TRUE;
}
Interesting is that the service AliasRepository provides a pathHasMatchingAlias() method but not one for the other direction, so you have to check whether the lookup method above returns a result.