Another way, is to defeat it. It will not disappear. It will disappear when you catch it. So check the rooms in the castle. There will be a Plasma grunt standing at a fireplace? I'm not sure about what it is, but he will transport you to the pokemon center. There you can buy some balls and there will be another grunt standing there to transport you back. That is in N's castle.