If Officer1 is a UNIT, then you're using createunit wrong. Try this:
"KEGSSoldierEB" createunit [getpos pos1, group officer1, "sol1 = this; this setbehaviour {safe}", 0.8, "PRIVATE"]
You have to create units into an existing group (which can be empty of units).