Note: The following answer is based on the boundary condition originally given by OP, namely
\begin{align}
c_0(0,t)&=A, \\
c_0(1,t)&=0, \\
c_0(x,0) &= 0\ \forall l>x>0.
\end{align}
The OP may change the boundary condition to a Neumann one. Should that happen, there will be a new solution. The basis idea will remain the same though.
WLOG, let $D=\frac12$, $A=1$ and $l=1$. Otherwise, you can always scale to these numbers.
By linearity of the diffusion equation, the final solution is the linear superposition of two functions $c_1(x,t)$ and $c_0(x,t)$ each being the diffusion equation solution of two sets of boundary conditions.
\begin{align}
c_1(0,t)&=c_1(1,t)=0 \\
c_1(x,0) &= x-1
\end{align}
and the solution for boundary condition
\begin{align}
c_0(0,t)&=1 \\
c_0(1,t)&=0 \\
c_0(x,0) &= 1-x
\end{align}
The latter solution is simply $c_0(x,t)=1-x$.
To obtain the first solution, we expand the domain to the whole real line and let the initial condition $c(x,0)$ be a periodic function of period $2$ and
$$c_1(x,0)=x-1,\ x\in(0,2].$$
Now the solution is
$$c_1(x,t) = \sum_{n=-\infty}^\infty\frac1{\sqrt{2\pi t}}\int_0^2e^{-\frac{(y-x-2n)^2}{t}}(y-1)\,dy.$$
It is clear that $c_1(x,t)$ satisfies the given boundary condition since it is an odd function with respect to $x=0$ and $x=1$. You should be able to take it over from here, making some simplifications. The final solution is an infinite series with terms involving exponentials and error functions.
The final solution is just the sum of the two solutions above
$$c(x,t)=c_0(x,t)+c_1(x,t).$$