direct free kick = can score goal
indirect free kick = cannot score goal without touching a teammate
If you score a goal off a free kick, then by law it has to be direct
Indirect free kicks that are own goals are taken as corners. Kicks that are "on target" but as still deflected still count as a shot and not an own goal, therefore in your case the ball deflects off a defender is still on target and is counted as a direct shot. You can't score a direct shot on indirect free kicks.
Your kick is therefore a direct kick