I have a polygon square grid 5x5km, clipped with admin boundaries. I want to create contiguous groups of cells (clusters) of almost equal area, minimizing the distance of each cell from the center of the cluster. I have tried Spatial Statistics > Mapping Clusters > Grouping analysis in ArcGIS but I do not understand how to set the parameter, and it does not work as I need. I get this type of results.
I wish to have an equal size cluster with spatial constraint. In this case with 2 clusters, but similar to the below example with 4:

