I want to explain why one should not expect that a given generic loop is ever the boundary of a holomorphic curve (unless $\dim M = 2$). My claim (or my intuition) depends of course on the definition of "generic", so let me try to justify the statement:
Take your loop $\gamma$, then construct a totally real submanifold $L$ that contains $\gamma$. (If $\gamma$ is embedded the construction of $L$ does not pose any difficulty; and we are not requiring that $L$ is closed or anything similar.)
Assuming now that $\gamma$ bounds a smooth map $f\colon \Sigma \to (M,J)$ for some Riemannian surface $\Sigma$, you can use the Riemann-Roch formula to compute the "expected" dimension of the space of holomorphic curves that are homotopic to $f$. Assuming that $\gamma$ is injective, and that $J$ is chosen "generically" (which of course is a bit of a mysterious property), you can assume that the expected dimension corresponds to the genuine dimension of the space of holomorphic curves.
If the expected dimension is negative, then there will not be any holomorphic curve bounded by $\gamma$ in this homotopy class.
(Note that morally the higher the genus of the surface the more negative the dimension! For example, if $S_1,S_2$ are closed Riemann surfaces and the genus of $S_2$ is $\ge 2$, then the expected dimension of a holomorphic curve
in $S_1\times S_2$ that is homotopic to $\{p\}\times S_2$ is negative. Obviously
if we take the product almost complex structure of $S_1\times S_2$ then the manifold will be foliated by the holomorphic curves $\{p\}\times S_2$, which seems to be a contradiction to what I wrote, but this is because the almost complex structure $j_1\oplus j_2$ is highly non-generic ... as soon as you slightly perturb it, no holomorphic curves in that homotopy class will survive.)
Note that up to here, we have not used that $M$ is symplectic, but only that it is almost complex!
The Riemann-Roch formula is
$$ \operatorname{index \bar \partial_J} = \frac{1}{2}\dim M \cdot \chi(\Sigma) + \mu (f^*TM, f^*TL) , $$
where $\chi(\Sigma)$ is the Euler class of $\Sigma$ and $\mu(f^*TM, f^*TL)$ is the Maslov index of $f$ with respect to $L$ which measures by how much $TL$ "turns" along $\gamma$ with respect to the trivialization of the complex bundle $f^*(TM,J)$.
In order for a generic $J$ to admit any holomorphic curve with boundary $\gamma$ it follows that the Maslov class $\mu(f^*TM, f^*TL)$ of the homotopy class of the potential holomorphic curve has to be large enough so that the Fredholm index is positive. For a chosen totally real submanifold $L$ there might thus exist certain homotopy classes that can be represented by holomorphic curves with boundary on $L$, but in the initial question you were not at all interested in a specific $L$ only in $\gamma$!
We can instead choose a countable family of totally real submanifolds $L_k$ such that for any smooth $f\colon (\Sigma, \partial \Sigma) \to (M, \gamma)$ we find an $L_k$ in this family such that the index of $f$ with respect to this $L_k$ will be negative (except of course, when $\dim M = 2$, because in this case $L = \gamma$ without choice).
We can then choose an almost complex structure $J$ close to the initial one that is regular for all of the countably many totally real submanifolds $L_k$ simultaneously. For this generic $J$ there is no holomorphic curve with boundary in $L_k$ that has negative index (with respect to this $L_k$). But this means that there is no holomorphic curve at all bounded by $\gamma$.
This proves that in a certain sense there is never a holomorphic curve with boundary $\gamma$ except for extremely special choices of $\gamma$ and $J$ (this of course is all modulo "genericity" of the almost complex structure, which is not a very user-friendly definition, because you can never check if "your" $J$ is actually "generic". But this is the way that symplectic topology goes...).