They are different kinds of words. They are both sometimes short.
Adverb: the word class that qualifies adjectives, verbs or clauses. Preposition: a function word that combines with a noun or pronoun or noun phrase to form a prepositional phrase that can have an adverbial or adjectival relation to some other word