the 4 pin plug is not stock , as far as i know is for a heated o2 ,
the rubber plug is for the oil idiot light and the fuel pump feed when oil pressure is above 4psi . its often disconnected and the sensor removed when adding an aftermarket oil pressure gauge , just make sure the terminals dont come in contact with bare metal or to each other , you could cut plug off and tape the wires up to prevent accidental grounding or shorting
now on to your issue with alt not charging ...
Does the volt light in the dash come on with key on i run position engine off . it should be on .. without the lamp the alternator isnt exited and wont charge
if bulb is not there with key on , make sure the one wire plug (brown wire) at rear of alternator is plugged in , if its plugged in you need to fix the bulb issue in the dash or issue in the brown wire but its usually a bad bulb or bulb socket contact
you can also get a casper field fix that will allow the alternator to charge even if the bulb doesnt work