The printer’s manuscript consistently has but for the first two main clauses in 3 Nephi 4:16. Similarly, the 1830 compositor also initially set but both times, but later he decided that there was some mistake, that the first but should be an and. When he made the in-press change in the type, he initially corrected the wrong but, namely, the one in the line below. After some more sheets had been printed, he discovered this error in his in-press change and restored the second but and changed the first but to an and. In other words, for the printed sheets of the 29th signature, we get the following three states for lines 33–34 on page 461 of the 1830 edition:
twentieth year; but in the twenty and first year they did not come up to battle, but they came up on all sides to lay siege
twentieth year; but in the twenty and first year they did not come up to battle, and they came up on all sides to lay siege
twentieth year; and in the twenty and first year they did not come up to battle, but they came up on all sides to lay siege
The question here is: how did the original manuscript read? Since originally both the 1830 edition as well as 𝓟 read but ... but for this passage, 𝓞 probably did as well. This would mean that the 1830 compositor was consciously trying to edit the first but to an and (and he did finally get it right).
When we compare “but in the twenty and first year they did not come up to battle” with the preceding verse (“the robbers did not come again to battle / neither did they come again in the twentieth year”), there seems to be no reversal in sense unless but is referring to the decision to lay siege. This is what the text is trying to say: “they did not come up to battle / but [instead] they came up on all sides to lay siege round about the people of Nephi”. In other words, the negative scope of the first but extends through to the end of the second but-clause:
The tendency is for the reader to interpret both but-clauses as occurring at the same syntactic level, with the scope of the first but extending only through the first clause:
but in the twenty and first year they did not come up to battle but they came up on all sides to lay siege round about the people of Nephi
But this particular interpretation does not work, as the 1830 compositor recognized. The critical text will restore the original but ... but, but with the understanding that the negative scope of the first but extends through the second one.
There are other examples in the text where editors have changed but to and and vice versa; Joseph Smith is responsible for one of them (marked below with an asterisk); the others are the result of editing for the 1920 LDS edition:
Note especially the example in Alma 42:30 where the but that was emended to and is a repeated but, just like here in 3 Nephi 4:16. Under Alma 42:30, I list other cases in the text of the repeated but, ones that have not been edited out.
It should be pointed out that Oliver Cowdery sometimes mixed up these two conjunctions. For a list of these, see the discussion regarding straight and strait under 1 Nephi 8:20. For another instance of variation between and and but in this part of the text (where both 𝓟 and the 1830 edition are firsthand copies of 𝓞), see under 3 Nephi 19:6.
Summary: Restore in 3 Nephi 4:16 the original sequence of two but ’s, but with the understanding that the second but is within the negative scope of the first one.