For now, forget about the base resistor. By the way, that is the 1k resistor in you green line and it is necessary.
As you tested it before, if you connect the pwm pin of the fan to the gound. The fan stops spinning. Now we are going to test if you can get the same result with a transistor. For this test you only need to hook it up as the picture below. This should turn of the fan. And when you connect it to the ground, the fan should spin at max speed.
If this is working, we can look at why it doesn't work with the Rpi. And if it doens't work, we need to change something in the hardware