Here is a preposition. Notice that it takes the place of a preposition phrase, not a noun.
- Give it to me.
- Give it here.
Here is not an indirect object in the sentence. It is a locative complement.
[ Note: In the nineteenth century, many grammarians thought 'prepositions' were words that came before nouns. This started to change about ninety years ago. Most modern grammarians now understand 'prepositions' as a grammatical class of word. These words, like verbs for example, can sometimes occur before a noun, but sometimes before a verb, before preposition, before a clause - or before nothing at all! In the Original Poster's example we see the preposition here occurring with no object. There is no extra word after this preposition.
For an introduction to the grammar of prepositions see: A Student's Introduction to English Grammar Huddleston & Pullum 2005 - or for a simpler introduction: Oxford Modern English Grammar Aarts 2011 ]