Lev 26:
27 ‘And after all this, if you do not obey Me, but walk contrary to Me,
28 then I also will walk contrary to you in fury;
and I, even I, will chastise you seven times for your sins.
29 You[g] shall eat the flesh of your sons, and you shall eat the flesh of your daughters.
30 I will destroy your high places, cut down your incense altars, and cast your carcasses on the lifeless forms of your idols;
and My soul shall abhor you.
31 I will lay your cities waste and bring your sanctuaries to desolation, and I will not smell the fragrance of your [h]sweet aromas.
32 I will bring the land to desolation, and your enemies who dwell in it shall be astonished at it.
33 I will scatter you among the nations and draw out a sword after you;
your land shall be desolate and your cities waste.
34 Then the land shall enjoy its sabbaths as long as it lies desolate and you are in your enemies’ land;
then the land shall rest and enjoy its sabbaths.
35 As long as it lies desolate it shall rest—
for the time it did not rest on your sabbaths when you dwelt in it.
36 ‘And as for those of you who are left, I will send faintness[i] into their hearts in the lands of their enemies;
the sound of a shaken leaf shall cause them to flee;
they shall flee as though fleeing from a sword, and they shall fall when no one pursues.
37 They shall stumble over one another, as it were before a sword, when no one pursues;
and you shall have no power to stand before your enemies.
38 You shall perish among the nations, and the land of your enemies shall eat you up.
39 And those of you who are left shall waste away in their iniquity in your enemies’ lands;
also in their fathers’ iniquities, which are with them, they shall waste away.
40 ‘But if they confess their iniquity and the iniquity of their fathers, with their unfaithfulness in which they were unfaithful to Me, and that they also have walked contrary to Me,
41 and that I also have walked contrary to them and have brought them into the land of their enemies;
if their uncircumcised hearts are humbled, and they accept their guilt—
42 then I will remember My covenant with Jacob, and My covenant with Isaac and My covenant with Abraham I will remember;
I will remember the land.
43 The land also shall be left empty by them, and will enjoy its sabbaths while it lies desolate without them;
they will accept their guilt, because they despised My judgments and because their soul abhorred My statutes.
44 Yet for all that, when they are in the land of their enemies, I will not cast them away, nor shall I abhor them, to utterly destroy them and break My covenant with them;
for I am the Lord their God.
45 But for their sake I will remember the covenant of their ancestors, whom I brought out of the land of Egypt in the sight of the nations, that I might be their God:
I am the Lord.’ ”
It doesn't say that is the reason they were held in captivity in Babylon is because they only broke the 7 year sabbaths, which is what we were discussing and I'll add some important context that appeared to be missing
Lev 26:1 ‘You shall not make idols for yourselves;
neither a carved image nor a
sacred pillar shall you rear up for yourselves;
nor shall you set up an engraved stone in your land, to bow down to it;
for I
am the Lord your God.
2 You shall [
a]keep My Sabbaths and reverence My sanctuary:
I
am the Lord.
3
‘If you walk in My statutes and keep My commandments, and perform them,
4
then I will give you rain in its season, the land shall yield its produce, and the trees of the field shall yield their fruit.
5 Your threshing shall last till the time of vintage, and the vintage shall last till the time of sowing;
you shall eat your bread to the full, and dwell in your land safely.
6 I will give peace in the land, and you shall lie down, and none will make
you afraid;
I will rid the land of evil[
b] beasts,
and the sword will not go through your land.
7 You will chase your enemies, and they shall fall by the sword before you.
8 Five of you shall chase a hundred, and a hundred of you shall put ten thousand to flight;
your enemies shall fall by the sword before you.
9 ‘For I will look on you favorably and make you fruitful, multiply you and confirm My covenant with you.
10 You shall eat the old harvest, and clear out the old because of the new.
11 I will set My [
c]tabernacle among you, and My soul shall not abhor you.
12 I will walk among you and be your God, and you shall be My people.
13 I
am the Lord your God, who brought you out of the land of Egypt, that
you should not be their slaves;
I have broken the bands of your yoke and made you walk [
d]upright.
14 ‘But if you do not obey Me, and do not observe all these commandments,
15 and if you despise My statutes, or if your soul abhors My judgments, so that you do not perform all My commandments,
but break My covenant,
16 I also will do this to you:
I will even appoint terror over you, wasting disease and fever which shall consume the eyes and cause sorrow of heart.
And you shall sow your seed [
e]in vain, for your enemies shall eat it.
17 I will [
f]set My face against you, and you shall be defeated by your enemies.
Those who hate you shall reign over you, and you shall flee when no one pursues you.
18 ‘And after all this, if you do not obey Me, then I will punish you seven times more for your sins.
19 I will break the pride of your power;
I will make your heavens like iron and your earth like bronze.
20 And your strength shall be spent in vain;
for your land shall not yield its produce, nor shall the trees of the land yield their fruit.
21 ‘Then, if you walk contrary to Me, and are not willing to obey Me, I will bring on you seven times more plagues, according to your sins.
22 I will also send wild beasts among you, which shall rob you of your children, destroy your livestock, and make you few in number;
and your highways shall be desolate.
23 ‘And if by these things you are not reformed by Me, but walk contrary to Me,
24 then I also will walk contrary to you, and I will punish you yet seven times for your sins.
25 And I will bring a sword against you that will execute the vengeance of the covenant;
when you are gathered together within your cities I will send pestilence among you;
and you shall be delivered into the hand of the enemy.