ComVlad, you need to spawn the NPC and then dock him to station. For example:
var ship_id = generator.AddNPCShipToSystem("Npc name goes here", "BaseSitter", 5, "special_human_techship", system_id, 1000, 1000, { class: "order.scientist", unique_id: "scientist.unique_id_goes_here", meta: "human", sex: "male", outfit: "science" });
relations.SetShipFaction(ship_id, "order");
generator.DockShipToBase(ship_id, station_id);
Please note you need to provide the system_id, station_id and fill the name and unique_id (if you need it).
"Dock" means immediately teleporting ship to the station.