Distributed order fractional operators offer a rigorous tool for mathematical modelling of multiphysics phenomena, where the differential orders are distributed over a range of values rather than being just a fixed integer/fraction as in standard/fractional ODEs/PDEs. We develop two spectrally accurate schemes, namely, a Petrov-Galerkin spectral method and a spectral collocation method for distributed order fractional differential equations. These schemes are developed based on the fractional Sturm-Liouville eigen-problems (FSLPs) [M. Zayernouri and G. E. Karniadakis, T. Comput. Phys., 47 (2013), pp. 2108-2131]. In the Petrov-Galerkin method, we employ fractional (nonpolynomial) basis functions, called Jacobi polyfractonomials, which are the eigenfunctions of the FSLP of first kind, while we employ another space of test functions as the span of polyfractonomial eigenfunctions of the FSLP of second kind. We define the underlying distributed Sobolev space and the associated norms, where we carry out the corresponding discrete stability and error analyses of the proposed scheme. In the collocation scheme, we employ fractional (nonpolynomial) Lagrange interpolants satisfying the Kronecker delta property at the collocation points. Subsequently, we obtain the corresponding distributed differentiation matrices to be employed in the discretization of the strong problem. We perform systematic numerical tests to demonstrate the efficiency and conditioning of each method.