Hello pavlix and welcome to Seven Forums.
The Disk Managment wizard is limited in what it can do. It might be easier to use the free MiniTool Partition Wizard. They have an option to "extend partition" that works quite well regardless of where the unallocated space is located in relation to the target partition
MiniTool Partition Wizard