It's an adverb of location (within a sequence). Possibly clearer is "I got there first, then he reached the line, and she arrived last." "Last" is a quality of her running of the race, rather than of her. See the usage examples under adverb in https://www.ahdictionary.com/word/search.html?q=last and http://www.collinsdictionary.com/dictionary/english/last
Yeah, your examples are good, in English it's really an adverb, my bad. It's sometimes difficult to distinguish adjectives and adverbs since adjectives do not change their form too. However, in Italian and some other languages, that I know, "last" in "she came last" is clearly an adjective and it can be feminine or masculine.