The large nut snugs the copper riser to the end of the fill valve.
The thin nut secures the fill valve in the tank.
These nuts are upside down. So make sure you are loosening them, not making them tighter. Just undo the large nut and it will drop down.