Any upgrade from Fedora 20 or earlier is done at your own risk as DNF was not the default package management tool. However, if you do have a release newer than Fedora 20 that is EOL, you can attempt to do an upgrade, but this method is not supported. You may try to upgrade through intermediate releases until you reach a currently-supported release, or try to upgrade to a currently-supported release in a single operation. Again this is un-supported and is at your own risk.