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.