Best bet here is to use Homebrew to install the latest version.
brew install nano
This will install nano to /usr/local/bin/nano
.
Next you will need to modify your .zshrc
or .bash_profile
(depending on what your shell is) to make sure you use this rather than the native variant.
Add the line:
alias nano="/usr/localnano="$(brew --prefix)/bin/nano"
(Restart your Terminal app for this to take effect.)