Advancing Learned Lossy Image Compression through Knowledge Distillation and Contextual Clustering