Clustering algorithm for a distance matrix
There are hundreds of algorithms to choose from.


Hierarchical clustering in it's myriad of variants. Cut the dendrogram as desired, e.g., to get k clusters
PAM, the closest match to k-means on a distance matrix (minimizes the average distance from the cluster center)
Spectral clustering
DBSCAN
OPTICS
HDBSCAN*
Affinity Propagation
...