The multiwavelength survey by Yale-Chile (Musyc): Deep near-infrared imaging and the selection of distant galaxies