Index comes into play when you have multiples of the same field (such as within a table or collection) so that isn't going to matter here when trying to target a specific option in a checkbox field.
The issue is that replace is replacing the entire list of options, not specific ones, that's just how it works. Typically working with this, you'll have an array of the options as a variable in your Javascript and you can modify that array variable and push it out to the field.
Here's an example of some code that updates a checkbox field to some preset labels and values and then changes one of the labels when the field is changed.
//When the form is loaded, create the array
//for the checkbox options and populate the checkbox.
var checkboxOptions =
[
{label: "Choice 1", value: "One"},
{label: "Choice 2", value: "Two"},
{label: "Choice 3", value: "Three"}
];
LFForm.changeFieldOptions( { fieldId: 2 }, checkboxOptions, "replace" );
//When the checkbox is changed, update the label
//on the checkbox item with value of Two.
LFForm.onFieldChange( function() {
for (let object of checkboxOptions) {
if (object.value == "Two") {
object.label = "New Option for Choice 2";
}
}
LFForm.changeFieldOptions( { fieldId: 2 }, checkboxOptions, "replace" );
}, { fieldId: 2 } );
Note that I have this updating both labels and values, because if you only update labels, it will create the values based on the labels, and so any selections from before the change are likely lost when the values change. But if you include the values in what you are updating in the script, then any selections in those values remain selected through the changes.