The last direct bus leaves at 21:00.After that, you can trains, but you will only get as far as Narita Station rather than the airport. Many airport hotels have shuttle buses to Narita Station. Otherwise, the taxi ride should not be too far.
There are many possible train routes:
http://www.jorudan.co.jp/english/norikae/