Unfortunately, when you are on board an entity you cannot know the location unless you are assigned pilot/etc and can access the cockpit page. Or if someone added the location into the room description.
Your best bet will be to ask the owner of the entity to give you the location. Try asking the faction that you were in/person who's ship you boarded and ask them. If you cannot remember etc then just make a thread in the Traders Lounge forum with the ships type, name and id so that others can help you find the owner.