Is this correlation between distance matrices?
You are basically right. You want to check the degree of dependence of one variable with respect to another one. No matter how you generate each variable, if you want to know how dependent it is from the other one, you normally use correlation to run that evaluation.

Very useful options you should consider to analyze the potential dependence between X and Y are:


Correlation: to measure both the strength and direction of the linear relationship between two variables.
Covariance: to assess the direction of the linear relationship between variables (not the strength).
Pearson's correlation: to obtain a single metric representing the degree (strength) of dependence between the two variables
Spearman's correlation: to evaluate a potential non-linear dependence between the two variables.


For more information, please, check this post here.