KNN custom transformer shows same accuracy for every k i set
You dont use self.k in your closest_n method (for starters).

U dont use it at all, you just initialise the property.

I would check sklearn implementation, just look under the hood here