Efficient scheme for on-demand light transfer between distant nanocavities