Below is a partial analytical solution to a variant of the problem using the trace distance.
Solution approach
We find an analytical expression for a lower bound on the trace distance $D(\rho_{AB}, \tilde{\rho}_{AB})$ and - under certain additional conditions described below - quantum states that achieve the bound. This gives us a partial solution of the variant
$$
\min_{\tilde{\rho}_{AB}} D(\tilde{\rho}_{AB},\rho_{AB})\\
s.t. \tilde{\rho}_B = \sigma_B\tag1
$$
of the problem where we use trace distance $D(\rho,\sigma)=\frac12\mathrm{tr}|\rho-\sigma|$, rather than the fidelity, to measure closeness of quantum states.
Lower bound on trace distance
Compute
$$
\begin{align}
D(\tilde{\rho}_{AB},\rho_{AB}) &\ge D(\mathrm{tr}_A\tilde{\rho}_{AB},\mathrm{tr}_A\rho_{AB})\\
&=D(\sigma_B,\mathrm{tr}_A\rho_{AB})\\
&=\frac12\mathrm{tr}|\sigma_B-\mathrm{tr}_A\rho_{AB}|
\end{align}\tag2
$$
where the inequality follows from the fact that partial trace is a completely positive trace-preserving (CPTP) map and CPTP maps are contractive, see e.g. theorem $9.2$ on page $406$ and equation $(9.45)$ on page $407$ in Nielsen & Chuang.
States achieving the lower bound
Let $\tau_A$ be any quantum state, so that $\mathrm{tr}\,\tau_A=1$. Define
$$
X:=\rho_{AB}+\tau_A\otimes(\sigma_B-\mathrm{tr}_A\rho_{AB}).\tag3
$$
Note that $X$ is unit trace, but not necessarily positive semidefinite (thanks for spotting this, @DaftWullie!) and thus not necessarily a quantum state. However,
$$
\begin{align}
D(X,\rho_{AB}) &= \frac12\mathrm{tr}|\rho_{AB}+\tau_A\otimes(\sigma_B-\mathrm{tr}_A\rho_{AB})-\rho_{AB}|\\
&=\frac12\mathrm{tr}|\tau_A\otimes(\sigma_B-\mathrm{tr}_A\rho_{AB})|\\
&=\frac12\mathrm{tr}|\sigma_B-\mathrm{tr}_A\rho_{AB}|
\end{align}\tag4
$$
so every $X$ defined in $(3)$ achieves the lower bound in $(2)$. Thus, if $X$ is positive semidefinite then the state $\tilde\rho_{AB}:=X$ is a solution to $(1)$.
Positive semidefiniteness
A candidate solution $X$ is positive semidefinite, and thus a solution to $(1)$, for example if
$$
\frac{1}{d_A}\|\sigma_B-\mathrm{tr}_A\rho_{AB}\|_2\le\lambda_{min}\tag5
$$
where $\|.\|_2$ is the spectral norm, $\lambda_{min}$ is the least eigenvalue of $\rho_{AB}$ and $d_A$ is the dimension of the Hilbert space of subsystem $A$.
Another case occurs when $\rho_{AB}=\rho_A\otimes\rho_B$ is a product state. Then by setting $\tau_A:=\rho_A$ we find that $\tilde\rho_{AB}=\rho_A\otimes\sigma_B$ which is positive semidefinite and thus a solution to $(1)$.