The answer has already been given, so this is mainly to give more background information about the puzzle.
It is called the Slothouber–Graatsma puzzle.
It is often attributed to the mathematician John Conway, because it was published in the book Winning Ways. A commercial version called "Pack It In" was produced in 2003 by Binary Arts (who are now called ThinkFun). You can see this version (with its solution) at this link:
which is a page on Jim Storer's puzzle site.
Here is a little bit of analysis:
6 of those blocks have a total volume of 24 unit cubes, so assuming they can be packed into the 3x3x3 cube, exactly 3 unit cubes will remain empty.
Whichever orientation a 2x2x1 block is placed, it will always fill an even number of the 9 small cubes in each layer.
Furthermore, if you give a layer checker-board colouring, the 2x2x1 blocks will always cover the same number of each colour, so the empty spot must lie in the centre or at a corner of that layer.
You can apply the above reasoning not just for each layer, but also for each vertical slice of the 3x3x3 cube in any direction. Every layer/slice must have at least one empty space, and because we have only three, they must have exactly one each. The only way to accomplish that with the space at the corner or centre of each layer/slice is to have the three empty spaces go along a main diagonal of the 3x3x3 cube. It turns out that this provides a solution, i.e. six 2x2x1 blocks can fill the 3x3x3 cube apart from three spaces along a main diagonal.
Conway did extend the idea above to larger puzzles, in particular a 5x5x5 packing puzzle, rightfully called the Conway Puzzle. If you apply the spoilered analysis to that puzzle it becomes much easier to solve.