You need to use the sys_id of the service offering, not the name since this is a reference field the value is a sys_id.  I've changed your alert to show you the value of the service offering selected.  In your first script you were getting the location of the caller, this script is getting the incident location.  If this change was intended the rest of the client script should be fine.  Added an alert on response to confirm that is the expected value.

function onChange(control, oldValue, newValue, isLoading) {
    // Check if the form is loading or if no new value is selected
    if (isLoading || !newValue) {
        return;
    }
    alert('Service offering = ' + newValue);
    // Check if the selected value is "ACD" or "Call Center"
    if (newValue === 'sys_id' || newValue === 'sys_id') {
        var locationSysId = g_form.getValue('location'); // Get the location field value

        // Ensure the location field is not empty
        if (locationSysId) {
            // Call the Script Include
            var ga = new GlideAjax('LocationUtils');
            ga.addParam('sysparm_name', 'getLocationDetails');
            ga.addParam('sysparm_location_id', locationSysId);
            ga.getXMLAnswer(function(response) {
                alert(response);
                // Parse the response
                var result = JSON.parse(response);
                if (result) {
                    // Set the Assignment Group and Assigned To fields
                    g_form.setValue('assignment_group', result.u_assignment_group);
                    g_form.setValue('assigned_to', result.u_assigned_to);
                } else {
                    g_form.addErrorMessage('Could not retrieve location details.');
                }
            });
        } else {
            g_form.addErrorMessage('Please select a location.');
        }
    }
}

If it's still not working post the Script Include (client script was posted twice above)