I made a castle on Minecraft Pocket Edition that was far away from the place that I spawned. Once I had made my castle, I went to the Nether and got lost. I made a new Nether portal, went through, and ended up at a completely different portal than the one I made at the castle. Now I'm lost. I have used the compass to get back to the place that I spawned, but I still need to get back to my castle. I'm in creative mode.
You should go into survival mode, turn on keep inventory, go to the nether, and kill yourself. You should NOT sleep while you're lost, or else when you die, you will be sent back to where you've last slept.
If this doesn't work, you could try building another castle. If you don't want to do that, try to create a map and if you don't see your castle on the map, fly somewhere farther away from your portal. You should keep creating new maps and spiraling away from your spawnpoint. You can do this without using maps, too. Eventually you should find your castle.