God always preserves a remnant. He always takes care of His own. Even when Israel went into captivity as divine punishment,God still provided comfort. Read the prophets:God pronounces judgment on the wicked,and offers hope to those that love and obey God.
Jer 46:27-28 But fear not thou,O my servant Jacob,[...]