Go to your "manage shipyard" tab. Select a shipyard that is commercial and has a slip that is as much or more tonnage as the freighter. Then, in the upper group of dropdowns, select "retool shipyard" in the other one, find your freighter and select it.
If u go to "shipyard tasks" tab, it should show that shipyard retooling.
Make sure your freighter is commercial. If u added sensors or a military engine, then ity is a military craft and you will need to retool a naval shipyard.
If u advance time 5 seconds and go back to the shipyard tab, the shipyard you selected should be retooled.
Now, select that shipyard again. Go to the lower group of drop downs and choose to build and then in the other dropdown choos your freighter. Below that, you will see buttons to rename it. I think u then need to hit "add" but I am not sure as I am doing this from memory.