Infinity_you could have a virus or something like that. just download https://www.malwarebytes.com/ and run a scan. your cpu could also be slightly overheating. i know that when i first build my computer it was overheating and causing me to have long load times. also if you havent in a while i would recommend restarting your computer. it can make a huge difference in performance.
I ran a scan with ESET and didn't find any malware. I'll try rebooting and I'll see if it works.
update: it takes significantly less time to join a server after rebooting, thank you for your help.