For completeness, I provide the fully generalized version in this post (since I guess someone will eventually ask). Let [eqn]\bold{A}[/eqn] be the initial position vector [eqn]\left ( \mathrm{A}_1, \mathrm{A}_2, \cdots, \mathrm{A}_n \right )[/eqn] and [eqn]\bold{B}[/eqn] the final position vector [eqn]\left ( \mathrm{B}_1, \mathrm{B}_2, \cdots, \mathrm{B}_n \right )[/eqn]. We want to find an initial velocity vector [eqn]\bold{v} \left ( v_1, v_2, \cdots, v_n \right )[/eqn] such that a projectile fired from [eqn]A[/eqn] with this velocity vector will collide with [eqn]B[/eqn] when subject to some constant force [eqn]\vec{F}[/eqn] producing an acceleration [eqn]\bold{a} \left (a_1, a_2, \cdots, a_n \right )[/eqn] on it. Note if the projectile has mass [eqn]m[/eqn], then [eqn]\vec{F} = m \bold{a}[/eqn] as expected.
Let [eqn]\bold{P}_t \left (\mathrm{P}_{1, t}, \mathrm{P}_{2, t}, \cdots, \mathrm{P}_{n, t} \right )[/eqn] be the position of the projectile at time [eqn]t[/eqn] after launch. Then from kinematics, for [eqn]1 \leqslant i \leqslant n[/eqn] we have:
[eqn]\mathrm{P}_{i, t} = \mathrm{A}_i + v_i t + \frac{1}{2} a_i t^2[/eqn]
And for the projectile to collide with [eqn]\bold{B}[/eqn], its position must satisfy [eqn]\bold{P}_t = \bold{B}[/eqn] for some time [eqn]t \geqslant 0[/eqn], so:
[eqn]\mathrm{B}_i = \mathrm{A}_i + v_i t + \frac{1}{2} a_i t^2[/eqn]
[eqn]v_i t = \mathrm{B}_i - \mathrm{A}_i - \frac{1}{2} a_i t^2[/eqn]
[eqn]\displaystyle v_i = \frac{\mathrm{B}_i - \mathrm{A}_i}{t} - \frac{1}{2} a_i t[/eqn]
Yielding a family of solutions for [eqn]\bold{v}[/eqn] for any positive [eqn]t[/eqn]. Negative [eqn]t[/eqn] works too, but it makes little sense since the intersection would have occurred before the projectile was launched, extrapolating its trajectory into the past - though you will notice flipping the sign of [eqn]t[/eqn] flips the sign of [eqn]v_i[/eqn] and thus simply inverts the direction of [eqn]\bold{v}[/eqn] anyway. This is a very nice and flexible result.
--------------------------------
What about nonconstant forces? Suppose [eqn]\vec{F}[/eqn] varies with time, so [eqn]a_i = f_a(i, t)[/eqn]. The force/mass relationship still works, of course. Perhaps this could take into account gravity as well as wind (possibly via some sinusoidal function to simulate atmospheric fluctuations). Can we still predict the correct velocity vector? The answer is, surprisingly, yes, but we must use calculus. We must integrate this acceleration function with respect to time once to obtain velocity, and once again to obtain displacement, which results in the following trajectory for [eqn]P_t[/eqn]:
[eqn]\displaystyle \mathrm{P}_{i, t} = \mathrm{A}_i + v_i t + \int_0^t \int_0^t f_a(i, t)\, \mathrm{d} t\, \mathrm{d} t[/eqn]
With the same criterion as before, this gives:
[eqn]\displaystyle \mathrm{B}_i = \mathrm{A}_i + v_i t + \int_0^t \int_0^t f_a(i, t)\, \mathrm{d} t\, \mathrm{d} t[/eqn]
And rearranging as we did before:
[eqn]\displaystyle v_i = \frac{\displaystyle \mathrm{B}_i - \mathrm{A}_i}{t} - \frac{\displaystyle \int_0^t \int_0^t f_a(i, t)\, \mathrm{d} t\, \mathrm{d} t}{t}[/eqn]
Which, interestingly enough, is a parametric solution in [eqn]t[/eqn]. Now, actually evaluating the double integral is probably the hardest part, especially if you're using some complex function such as perlin noise as the acceleration, but if worst comes to worst, approximations exist. Besides, it's likely your predicted trajectory doesn't have to be perfect, but just close enough.
Let's try and pick some relatively simple time-varying function and see if it works. For instance, let's say in our hypothetical world, gravity is modulated by a sinusoidal function. Kind of weird, but hey. So for instance, we have [eqn]f_a(i, t) = a_{i, 0} \sin{t}[/eqn]. Then the double integral is easy enough to calculate (remember those are definite integrals):
[eqn]\displaystyle\int_0^t \int_0^t f_a(i, t)\, \mathrm{d} t\, \mathrm{d} t = a_{i, 0} \left ( t - \sin{t} \right )[/eqn]
So let's plug everything into our parametric equation and see what we get:
[eqn]\displaystyle v_i = \frac{\mathrm{B}_i - \mathrm{A}_i}{t} - a_{i, 0} \left ( 1 - \frac{\sin{t}}{t}} \right )[/eqn]
The resulting trajectory for some [eqn]t[/eqn] is illustrated below:

What about a different time-varying function, let's say [eqn]f_a(i, t) = a_{i, 0} \left ( 1 - \sin^2{\pi t} \right )[/eqn]. Then the double integral is more complicated but still tractable:
[eqn]\displaystyle\int_0^t \int_0^t f_a(i, t)\, \mathrm{d} t\, \mathrm{d} t = a_{i, 0} \frac{1}{8} \left ( 2t^2 + 1 - \cos{2 \pi t} \right )[/eqn]
Which gives the following trajectory for some [eqn]t[/eqn] (this is
not a parabola):

--------------------------------
Note if [eqn]f_a(i, t) = a_{i, 0}[/eqn], then the double integral becomes [eqn]\frac{1}{2} a_{i, 0} t^2[/eqn], and we get back the familiar kinematics equation. If [eqn]f_a(i, t) = 0[/eqn] then you just get back [eqn]\bold{v} = \frac{\bold{d}}{t}[/eqn] as you would expect. It's also possible to make the force vary on position instead of just time, but you need more integrals and it just gets messy and tedious to calculate, so we'll leave it at that.
--------------------------------
Additional note: if [eqn]\mathrm{B}[/eqn] happens to be moving, you can also take that into account (isn't math wonderful) by changing the [eqn]\mathrm{B}_i[/eqn] term - which is a position - into a function of time [eqn]t[/eqn]. If you want a
time-varying force to be applied to [eqn]\mathrm{B}[/eqn], you can use the same methods as above, which involve another double integral. However at this point, the problem essentially boils down to finding a parameterized intersection of two differential curves, which might be better tackled by other methods involving more specialized forms of calculus.