QSPI programming requires the device to boot in JTAG mode, as mentioned by the program_flash output log.
Although JTAG boot mode is highly recommended, there is a work-around for devices booting in QSPI-boot mode.
Starting in 2017.3, programming flash for Zynq-7000 requires that you specify an FSBL. See (Xilinx Answer 70148).
This FSBL is required to initialize the system (mainly to run the ps7_init() function).
If booting in QSPI boot mode, this FSBL will try to load partitions from the flash causing misbehavior of the flash programming.
With the following modification we limit this FSBL (used only for flash programming) to basically only run the initialization (ps7_init()).
Create a new FSBL project and add the following change (main.c) to use it for Flash programming in SDK.
This should prevent the FSBL from loading any existing partition from the Flash device while programming is in operation.