Finally I have found a way to accomplish this , The solution to problem is to call update the field setting function
function ninja_forms_change_required_field(){
add_action( 'ninja_forms_before_pre_process', 'ninja_forms_code' );
}
add_action( 'init', 'ninja_forms_change_required_field' );
function ninja_forms_code(){
global $ninja_forms_processing;
if(!is_user_logged_in()){
$data['req'] = '0';
$ninja_forms_processing->update_field_settings(135, $data);
}
}
If a field is required then then $data[‘req’] = ‘1’