I can't upload a sketch on Atmega328 with bootloader.

I followed Nick Gammon's tutorial on Arduino-compatible minimal board: http://www.gammon.com.au/breadboard It worked out fine for 8 MHz. Then I added the crystal and 22pF capacitors and burned the Uno booltloader with seemingly no problems. Then I tried uploading the ASCII sketch and this is what I get:

Sketch uses 1960 bytes (6%) of program storage space. Maximum is 32256 bytes.
Global variables use 250 bytes (12%) of dynamic memory, leaving 1798 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x3d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x3d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x3d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x3d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x3d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x3d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x3d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x3d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x3d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x3d
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

What may have gone wrong? I checked the wiring and chose Arduino/Genuino Board in the IDE.

Are you still using the ISP programmer to upload the sketch? If so, did you use “Sketch>Upload using programmer” in the IDE?

Are you able to burn the bootloader again? That would let you know if there is any problem with the crystal not working.