I think that "I am in the castle waiting for the train" makes more sense as the translation given can be read to mean that the train is in the castle (unless that is what was intended)
and "I wait" should also be accepted.
I am waiting for the train in the Buda Castle. ???
True Buda Castle is often referred to as just "The Castle" - but there are no trains there.