Lock every object across entire keynote deck using applescript?
If you look at the Keynote AppleScript Dictionary you will see that the "group" element has no property for the boolean "locked". It seems that the only things that can be locked are the individual elements of the slide, but not a group on the slide, nor the slide itself.

If you can, I'd suggest going through and ungrouping the groups in your slide, re-run your script to lock all of the individual elements on each slide, then go back and group them again (If you can group locked items, which I do not know). Depending on how or why the elements are grouped, this might have a negative visual impact on the group itself (They might not look right).

I would have posted this as just a comment, but Stack Exchange won't let me comment yet. So here is your "Answer", not that it solves your problem.