Nearest matrix with a prescribed eigenvalue of bounded multiplicities