It looks more like an adverbial phrase (of place) to me. There are a couple other issues you may need to address with this sentence:
- Agreement - The words 'was' and 'now' don't agree. Here are a few options.
A few miles into the town, I saw a beautiful building that was now abandoned.
or
A few miles into the town, I saw a beautiful building that had been abandoned.
or
A few miles into the town, I saw a beautiful building that is now abandoned. (this version shifts the tense)
- If the writer just happened upon a random abandoned building, why not just say 'I saw a beautiful abandoned building'? Pointing out that it is now abandoned suggests that the writer was familiar with the building before it was abandoned, and there is some back story.
To address the second part of your question. The prepositional phrase 'into town' modifies the the noun phrase 'a few miles'. You need both parts together for it to make sense.