ndcg_score receives y_true as an array-like of class labels, which may be ints or strings. These are implicitly mapped to columns in y_score, but it should be possible for the user to explicitly provide a classifier's classes_ attribute which maps class labels from training to columns in its output predict_proba or decision_function score matrices. Elsewhere in metrics, a labels parameter is available with similar function.
The implementation should build upon #9928 (or wait until it is merged).