Do a Library Backup (File - Library) on MC17 and move that file to the new computer. You can put it on your external drive to move it.
Connect the external drive to the new computer.
Install MC31 on the new computer.
Restore (File - Library) the Library Backup to MC31.
As long as the fileame (path) is the same on the new computer as on the old, the tracks should be available. If the path is different (e.g. E: rather than D:), you can use the Rename, Move, Copy option to change the path. e.g. change D: to E: If you need to do that, do a few files at a time to check that it is working correctly, then do all the rest of the files.
Rebuild Thumbnails.
Update Options - Audio if necessary.
MC31 should load the MC17 library, but if it does not, you may need to install an intermediate version of MC (like MC25), load the original library backup and then write out a new library for MC31 to read.
Don't delete anything until you are sure everything is working correctly.