1) Find out your uuid used on the server. It's usually displayed in the console when you join.
2) Find out the uuid used on SP. Typically this is displayed on the SP console.
On the downloaded world navigate into the player data directory and find your player file. It's named after your uuid on the server. Rename it to the uuid used on SP.
Thank you! This one worked and I finally restored my last location and inventory items. Only problem is that my previous Advancements was fully reset but it worked fine. For anyone in the future, you can find your Singleplayer UUID by creating a new world, going to ".minecraft" folder, finding the world you created, and going to the "playerdata folder".