Okay, first, it looks like you pasted the formula into the cell multiple times. Clear Column C and paste this formula into C2

=IFERROR(INDEX($B$2:$B$500,SMALL(INDEX(ROW($B$2:$B$500) -1+($B$2:$B$500="")*10000,0),ROW(A1))),"")
Because you are starting in row 2, I modified the range and substracted 1 from the formula (in red).
Does that work for you?