Your (1) and (2) would function the same most of the time. But if I try, I think I can imagine a context where they would mean slightly different things.
(1) I'm telling someone an anecdote, about something that happened to me. I'm far from home when I tell this story. Let's say the story starts out in a town not far from my own -- let's call it Jackson. At a certain point in my story, the listener needs to know that the town where I live isn't far from Jackson. Maybe there's going to be a dramatic car ride to go pick up some item that is urgently needed in time for a concert that's going to start shortly. Let's say the item was in a suitcase that the airlines have misplaced. To explain that my town isn't far from Jackson, I say, "I live in a nearby town. So I jumped in my car and drove home as fast as I could. I grabbed my copy of the score of Beethoven's Fifth and raced back to the concert hall in Jackson, arriving just as the orchestra was tuning."
(2) Note that this sentence wouldn't work in the story about the dramatic car ride.
Moving on. In (A), "nearby" is describing "restaurant;" since "restaurant" is a noun, "nearby" functions as an adjective in this sentence. In (B), "nearby" tells us where you live. Therefore it functions as an adverb in this sentence.
(C): adverb; (D): adjective; same analysis as for (A) and (B).
To get better at distinguishing between adjectives and adverbs, I recommend that you start by practicing with simple sentences. Use a different symbol to indicate each one -- for example, circle the adjectives, and underline the adverbs. You could even use different colors. BUT before you do that, you should get completely solid on identifying NOUNS and VERBS. When you can do that comfortably and easily, the adjectives and adverbs will jump off the page at you, for the most part.
Do you have a teacher who can check your exercises?
Traditionally, it's referred to as a "subordinating conjunction" because it introduces a subordinate clause.
But in modern grammar, it's analyzed as a preposition that takes a clause rather than a noun phrase as a complement.
Best Answer
The author is correct in saying it as an adjective. The word in this sentence is a predicate adjective. Is is a linking verb, so the word will either be a predicate nominative or a predicate adjective. In this case, it is describing the pronoun it so it is an adjective. It is difficult.